package com.sg.service.biz.framework.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.base.framework.req.*;
import com.sg.dto.biz.framework.req.*;
import com.sg.dto.biz.framework.res.*;
import com.sg.service.base.framework.MDeptService;
import com.sg.service.base.framework.MTypeDictionaryService;
import com.sg.service.biz.framework.BatchService;
import com.sg.service.biz.framework.BusinessAtomService;
import com.sg.service.biz.framework.OrgService;
import com.wicket.okrcomponent.integration.FwCompCommonClient;
import com.wicket.okrcomponent.integration.ConfSchemeService;
import com.wicket.okrcomponent.integration.InterfaceModeService;
import com.wicket.okrcomponent.integration.dto.*;
import com.sg.common.exception.Assert;
import com.wicket.okrframework.common.exception.BizException;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class OrgDictionaryServiceImpl
        implements com.wicket.okrframework.biz.service.OrgDictionaryService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    private MTypeDictionaryService mTypeDictionaryService;
    @Resource
    private MDeptService mDeptService;
    //@Resource
    //private MCustomFields2Service mCustomFields2Service;
    @Resource
    private NbOrgDictionary nbOrgDictionary;
    @Resource
    private InterfaceModeService interfaceModeService;
    //@Resource
    //private undefinedService undefinedService;
    @Resource
    private OrgService orgService;
    @Resource
    private BusinessAtomService businessAtomService;
    @Resource
    private ConfSchemeService confSchemeService;
    @Resource
    private FwCompCommonClient fwCompCommonClient;
    @Resource
    private BatchService batchService;
//@Resource
    //private BusinessAtomService businessAtomService;
//@Resource
    //private BusinessAtomService businessAtomService;

    /**
     * D1-3查组织架构类型字典列表[1337]
     * gen by moon at 10/14/2022, 3:36:55 AM
     */
    @Trace(operationName = "D1-3查组织架构类型字典列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgClassListRespDto queryOrgClassList(QueryOrgClassListReqDto reqDto) {
        reqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID

        List<TypeDictionary> listTypeDictionary_1 = new ArrayList<>();
//步骤0: 1-3-16查询组织架构类型字典列表 - queryOrgClassList
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        QueryOrgClassListReq queryOrgClassListReq = new QueryOrgClassListReq();
        if (reqDto != null) {
            queryOrgClassListReq.setPurposeCode(reqDto.getPurposeCode());//SimpleFieldAssign//sourceId:30782_1
            queryOrgClassListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:30783_1
            queryOrgClassListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:30784_1
            queryOrgClassListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:49706_1
            queryOrgClassListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:49782_1
        }

        /*1-3-16查询组织架构类型字典列表[295]   */
        Assert.isNull(queryOrgClassListReq.getPurposeCode(), "D1-3查组织架构类型字典列表-1-3-16查询组织架构类型字典列表-类型用途编码不能为空", false);
        listTypeDictionary = mTypeDictionaryService.queryOrgClassList(queryOrgClassListReq);


        listTypeDictionary_1 = listTypeDictionary;

        QueryOrgClassListRespDto retData = new QueryOrgClassListRespDto();
        retData.setOrgClassList(listTypeDictionary_1.stream().map(item -> BeanUtil.toBean(item, OrgClassDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:30788_1


        return retData;
    }

    /**
     * D1-3查组织架构类型字典（边界）[953]
     * gen by moon at 8/13/2022, 10:38:22 PM
     */
    @Trace(operationName = "D1-3查组织架构类型字典（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgClassBorderDetailRespDto queryOrgClassBorderDetail(QueryOrgClassBorderDetailReqDto reqDto) {


        TypeDictionary typeDictionary_1 = null;
//步骤0: 1-3-16查询组织架构类型字典详情 - queryOrgClassDetail
        TypeDictionary typeDictionary = null;
        QueryOrgClassDetailReq queryOrgClassDetailReq = new QueryOrgClassDetailReq();
        queryOrgClassDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:19305_1
        if (reqDto != null) {
            queryOrgClassDetailReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//sourceId:19303_1
            queryOrgClassDetailReq.setPurposeCode(reqDto.getPurposeCode());//sourceId:19686_1
            queryOrgClassDetailReq.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//sourceId:19304_1
            queryOrgClassDetailReq.setIsArchive(reqDto.getIsArchive());//sourceId:43241_1
        }

        /*1-3-16查询组织架构类型字典详情[950]   */
        Assert.isNull(queryOrgClassDetailReq.getSubjectLifeCycle(), "D1-3查组织架构类型字典（边界）-1-3-16查询组织架构类型字典详情-主体生命周期不能为空", false);
        typeDictionary = mTypeDictionaryService.queryOrgClassDetail(queryOrgClassDetailReq);

        typeDictionary_1 = typeDictionary;

        QueryOrgClassBorderDetailRespDto retData = new QueryOrgClassBorderDetailRespDto();
        if (typeDictionary_1 != null) {
            retData.setTypeDictionaryId(typeDictionary_1.getTypeDictionaryId());//sourceId:19604_1
            retData.setPurposeCode(typeDictionary_1.getPurposeCode());//sourceId:19605_1
            retData.setTypeDictionaryCode(typeDictionary_1.getTypeDictionaryCode());//sourceId:19606_1
            retData.setTypeDictionaryName(typeDictionary_1.getTypeDictionaryName());//sourceId:19607_1
            retData.setOrderNumber(typeDictionary_1.getOrderNumber());//sourceId:19608_1
            retData.setOperationInductionId(typeDictionary_1.getOperationInductionId());//sourceId:19611_1
            retData.setOperateTime(typeDictionary_1.getOperateTime());//sourceId:19612_1
        }


        return retData;
    }

    /**
     * D1-3修改组织架构类型字典[821]
     * gen by moon at 4/3/2024, 12:09:23 AM
     */
    @Trace(operationName = "D1-3修改组织架构类型字典")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateOrgClassRespDto updateOrgClass(UpdateOrgClassReqDto reqDto) {


        //步骤0: D1获取部门业务身份(公共) - obtainDeptBusinessIdentityCom
        ObtainDeptBusinessIdentityComRespDto obtainDeptBusinessIdentityComRespDto = null;
        ObtainDeptBusinessIdentityComReqDto obtainDeptBusinessIdentityComReqDto = new ObtainDeptBusinessIdentityComReqDto();
        obtainDeptBusinessIdentityComReqDto.setCustomField(",");//CUSTOM_CONVENTION//sourceId:1689821_1
        if (reqDto != null) {
            obtainDeptBusinessIdentityComReqDto.setDeptBusinessIdentityList(reqDto.getDeptBusinessIdentityList());//list-field-assign//sourceId:1689820_1
        }

        /*D1获取部门业务身份(公共)[9092]   */
        Assert.isNull(obtainDeptBusinessIdentityComReqDto.getCustomField(), "D1-3修改组织架构类型字典-D1获取部门业务身份(公共)-自定义字段不能为空", false);
        obtainDeptBusinessIdentityComRespDto = obtainDeptBusinessIdentityCom(obtainDeptBusinessIdentityComReqDto)/*vcase invoke 同服务,同domain*/;


//步骤1: 1-3-16修改组织架构类型字典 - updateOrgClass
        boolean bOOLEAN;
        if (obtainDeptBusinessIdentityComRespDto != null) {
            TypeDictionary typeDictionary = new TypeDictionary();
            if (reqDto != null) {
                typeDictionary.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:39965_1
                typeDictionary.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:39966_1
                typeDictionary.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:39967_1
                typeDictionary.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:39968_1
                typeDictionary.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1688221_1
                typeDictionary.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:51615_1
            }
            if (obtainDeptBusinessIdentityComRespDto != null) {
                typeDictionary.setThemeCode(obtainDeptBusinessIdentityComRespDto.getCustomText());//SimpleFieldAssign//sourceId:1688220_1
            }

            /*1-3-16修改组织架构类型字典[292]   */
            Assert.isNull(typeDictionary.getTypeDictionaryId(), "D1-3修改组织架构类型字典-1-3-16修改组织架构类型字典-类型字典ID不能为空", false);
            bOOLEAN = mTypeDictionaryService.updateOrgClass(typeDictionary)/*vcase invoke 本地 method 方法调用;*/;


        }

        UpdateOrgClassRespDto retData = new UpdateOrgClassRespDto();


        return retData;
    }

    /**
     * D1-3新增组织架构类型字典[820]
     * gen by moon at 4/3/2024, 12:09:22 AM
     */
    @Trace(operationName = "D1-3新增组织架构类型字典")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddOrgClassRespDto addOrgClass(AddOrgClassReqDto reqDto) {


        String string_1 = null;
//步骤0: D1获取部门业务身份(公共) - obtainDeptBusinessIdentityCom
        ObtainDeptBusinessIdentityComRespDto obtainDeptBusinessIdentityComRespDto = null;
        ObtainDeptBusinessIdentityComReqDto obtainDeptBusinessIdentityComReqDto = new ObtainDeptBusinessIdentityComReqDto();
        obtainDeptBusinessIdentityComReqDto.setCustomField(",");//CUSTOM_CONVENTION//sourceId:1689553_1
        if (reqDto != null) {
            obtainDeptBusinessIdentityComReqDto.setDeptBusinessIdentityList(reqDto.getDeptBusinessIdentityList());//list-field-assign//sourceId:1689552_1
        }

        /*D1获取组织架构类型字典主题标识-部门业务身份(公共)[9092]   */
        Assert.isNull(obtainDeptBusinessIdentityComReqDto.getCustomField(), "D1-3新增组织架构类型字典-D1获取组织架构类型字典主题标识-部门业务身份(公共)-自定义字段不能为空", false);
        obtainDeptBusinessIdentityComRespDto = obtainDeptBusinessIdentityCom(obtainDeptBusinessIdentityComReqDto)/*vcase invoke 同服务,同domain*/;


//步骤1: 1-3-16新增组织架构类型字典 - addOrgClass
        String string = null;
        if (obtainDeptBusinessIdentityComRespDto != null) {
            TypeDictionary typeDictionary = new TypeDictionary();
            if (reqDto != null) {
                typeDictionary.setPurposeCode(reqDto.getPurposeCode());//SimpleFieldAssign//sourceId:39920_1
                typeDictionary.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:49052_1
                typeDictionary.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:39922_1
                typeDictionary.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:39923_1
                typeDictionary.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1688211_1
                typeDictionary.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:39924_1
                typeDictionary.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:51596_1
            }
            if (obtainDeptBusinessIdentityComRespDto != null) {
                typeDictionary.setThemeCode(obtainDeptBusinessIdentityComRespDto.getCustomText());//SimpleFieldAssign//sourceId:1688210_1
            }

            /*1-3-16新增组织架构类型字典[291]   */
            Assert.isNull(typeDictionary.getPurposeCode(), "D1-3新增组织架构类型字典-1-3-16新增组织架构类型字典-类型用途编码不能为空", false);
            Assert.isNull(typeDictionary.getTypeDictionaryCode(), "D1-3新增组织架构类型字典-1-3-16新增组织架构类型字典-类型字典编码不能为空", false);
            Assert.isNull(typeDictionary.getTypeDictionaryName(), "D1-3新增组织架构类型字典-1-3-16新增组织架构类型字典-类型字典名称不能为空", false);
            Assert.isNull(typeDictionary.getOrderNumber(), "D1-3新增组织架构类型字典-1-3-16新增组织架构类型字典-排序不能为空", false);
            Assert.isNull(typeDictionary.getSubjectLifeCycle(), "D1-3新增组织架构类型字典-1-3-16新增组织架构类型字典-主体生命周期不能为空", false);
            string = mTypeDictionaryService.addOrgClass(typeDictionary)/*vcase invoke 本地 method 方法调用;*/;


            string_1 = string;
        }

        AddOrgClassRespDto retData = new AddOrgClassRespDto();
        if (string_1 != null) {
            retData.setTypeDictionaryId(string_1);//SimpleFieldAssign//sourceId:39933_1
        }


        return retData;
    }

    /**
     * D1-3查询可删除部门类型字典列表[1526]
     * gen by moon at 10/2/2022, 12:10:27 AM
     */
    @Trace(operationName = "D1-3查询可删除部门类型字典列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeleteDeptClassListRespDto queryDeleteDeptClassList(QueryDeleteDeptClassListReqDto reqDto) {


        List<Dept> listDept_1 = new ArrayList<>();
//步骤0: 1-3-09查询部门列表 - queryDeptList
        List<Dept> listDept = new ArrayList<>();
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        if (reqDto != null) {
            queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:42753_1
            queryDeptListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:42755_1
            queryDeptListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:51778_1
            queryDeptListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:51773_1
        }

        /*1-3-09查询部门列表[217]   */
        Assert.isNull(queryDeptListReq.getTypeDictionaryId(), "D1-3查询可删除部门类型字典列表-1-3-09查询部门列表-部门类型字典ID不能为空", false);
        Assert.isNull(queryDeptListReq.getOrganizationId(), "D1-3查询可删除部门类型字典列表-1-3-09查询部门列表-组织ID不能为空", false);
        listDept = mDeptService.queryDeptList(queryDeptListReq);


        listDept_1 = listDept;

        QueryDeleteDeptClassListRespDto retData = new QueryDeleteDeptClassListRespDto();
        retData.setDeptList(listDept_1.stream().map(item -> item.getDeptId())
                .collect(Collectors.toList()));/*list-to-strings*///sourceId:42786_1


        return retData;
    }

    /**
     * D1-3删除组织架构类型字典[822]
     */
    @Trace(operationName = "D1-3删除组织架构类型字典")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteOrgClassRespDto deleteOrgClass(DeleteOrgClassReqDto reqDto) {


        //步骤0: 1-3-09查询部门列表 - queryDeptList
        List<Dept> listDept = null;
        QueryDeptListReq queryDeptListReq = new QueryDeptListReq();
        if (reqDto != null) {
            queryDeptListReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//sourceId:40009_1
        }

        /*1-3-09查询部门列表[217]   */
        listDept = mDeptService.queryDeptList(queryDeptListReq);


//步骤1: 1-3-16删除组织架构类型字典 - deleteOrgClass
        boolean bOOLEAN;
        String string = new String();
        if (reqDto != null) {
            string = reqDto.getTypeDictionaryId();
            ;//sourceId:40013_1
        }

        /*1-3-16删除组织架构类型字典[293]   */
        bOOLEAN = mTypeDictionaryService.deleteOrgClass(string);


        DeleteOrgClassRespDto retData = new DeleteOrgClassRespDto();


        return retData;
    }

    /**
     * D1-3查询组织架构字典边界详情(公共)(边界)[953]
     * gen by moon at 10/23/2022, 6:54:21 PM
     */
    @Trace(operationName = "D1-3查询组织架构字典边界详情(公共)(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryOrgClassBorderDetailComBorderRespDto queryOrgClassBorderDetailComBorder(QueryOrgClassBorderDetailComBorderReqDto reqDto) {


        TypeDictionary typeDictionary_1 = null;
//步骤0: 1-3-16查询组织架构类型字典详情 - queryOrgClassDetail
        TypeDictionary typeDictionary = null;
        QueryOrgClassDetailReq queryOrgClassDetailReq = new QueryOrgClassDetailReq();
        queryOrgClassDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:19305_1
        queryOrgClassDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:306136_1
        if (reqDto != null) {
            queryOrgClassDetailReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:19303_1
            queryOrgClassDetailReq.setPurposeCode(reqDto.getPurposeCode());//SimpleFieldAssign//sourceId:19686_1
            queryOrgClassDetailReq.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:19304_1
            queryOrgClassDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:279373_1
        }

        /*1-3-16查询组织架构类型字典详情[950]   */
        Assert.isNull(queryOrgClassDetailReq.getSubjectLifeCycle(), "D1-3查询组织架构字典边界详情(公共)(边界)-1-3-16查询组织架构类型字典详情-主体生命周期不能为空", false);
        typeDictionary = mTypeDictionaryService.queryOrgClassDetail(queryOrgClassDetailReq);


        typeDictionary_1 = typeDictionary;

        QueryOrgClassBorderDetailComBorderRespDto retData = new QueryOrgClassBorderDetailComBorderRespDto();
        if (typeDictionary_1 != null) {
            retData.setTypeDictionaryId(typeDictionary_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:19604_1
            retData.setPurposeCode(typeDictionary_1.getPurposeCode());//SimpleFieldAssign//sourceId:19605_1
            retData.setTypeDictionaryCode(typeDictionary_1.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:19606_1
            retData.setTypeDictionaryName(typeDictionary_1.getTypeDictionaryName());//SimpleFieldAssign//sourceId:19607_1
            retData.setOrderNumber(typeDictionary_1.getOrderNumber());//SimpleFieldAssign//sourceId:19608_1
            retData.setOperationInductionId(typeDictionary_1.getOperationInductionId());//SimpleFieldAssign//sourceId:19611_1
            retData.setOperateTime(typeDictionary_1.getOperateTime());//SimpleFieldAssign//sourceId:19612_1
        }


        return retData;
    }

    /**
     * D1-3查询部门类型字典(公共)[4101]
     * gen by moon at 10/15/2022, 5:39:12 PM
     */
    @Trace(operationName = "D1-3查询部门类型字典(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptClassDetailComRespDto queryDeptClassDetailCom(QueryDeptClassDetailComReqDto reqDto) {


        TypeDictionary typeDictionary_1 = null;
//步骤0: 1-3-16查询组织架构类型字典详情 - queryOrgClassDetail
        TypeDictionary typeDictionary = null;
        QueryOrgClassDetailReq queryOrgClassDetailReq = new QueryOrgClassDetailReq();
        queryOrgClassDetailReq.setPurposeCode("DEPT_TYPE");//sourceId:229989_1
        queryOrgClassDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:223565_1
        queryOrgClassDetailReq.setAppId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecAppId());//CURRENT_APPID//sourceId:223566_1
        if (reqDto != null) {
            queryOrgClassDetailReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:223541_1
            queryOrgClassDetailReq.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:229990_1
            queryOrgClassDetailReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:229996_1
            queryOrgClassDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:223543_1
        }

        /*1-3-16查询组织架构类型字典详情[950]   */
        Assert.isNull(queryOrgClassDetailReq.getPurposeCode(), "D1-3查询部门类型字典(公共)-1-3-16查询组织架构类型字典详情-类型用途编码不能为空", false);
        Assert.isNull(queryOrgClassDetailReq.getSpaceId(), "D1-3查询部门类型字典(公共)-1-3-16查询组织架构类型字典详情-创建于空间ID不能为空", false);
        Assert.isNull(queryOrgClassDetailReq.getAppId(), "D1-3查询部门类型字典(公共)-1-3-16查询组织架构类型字典详情-创建于联盟应用ID不能为空", false);
        typeDictionary = mTypeDictionaryService.queryOrgClassDetail(queryOrgClassDetailReq);
        Assert.isTrue(typeDictionary == null || typeDictionary.getTypeDictionaryId() == null, "返回值不能为空", false);

        typeDictionary_1 = typeDictionary;

        QueryDeptClassDetailComRespDto retData = new QueryDeptClassDetailComRespDto();
        if (typeDictionary_1 != null) {
            retData.setTypeDictionaryId(typeDictionary_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:223570_1
            retData.setTypeDictionaryCode(typeDictionary_1.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:223571_1
            retData.setTypeDictionaryName(typeDictionary_1.getTypeDictionaryName());//SimpleFieldAssign//sourceId:223896_1
        }


        return retData;
    }

    /**
     * D1-3查询部门类型字典列表(公共)[4047]
     * gen by moon at 10/15/2022, 5:39:13 PM
     */
    @Trace(operationName = "D1-3查询部门类型字典列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryDeptClassListComRespDto queryDeptClassListCom(QueryDeptClassListComReqDto reqDto) {


        List<TypeDictionary> listTypeDictionary_1 = new ArrayList<>();
//步骤0: 1-3-16查询组织架构类型字典列表 - queryOrgClassList
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        QueryOrgClassListReq queryOrgClassListReq = new QueryOrgClassListReq();
        queryOrgClassListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:218799_1
        if (reqDto != null) {
            queryOrgClassListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:218793_1
            queryOrgClassListReq.setPurposeCode(reqDto.getPurposeCode());//SimpleFieldAssign//sourceId:218792_1
            queryOrgClassListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:218796_1
        }

        /*1-3-16查询部门类型列表[295]   */
        Assert.isNull(queryOrgClassListReq.getOrganizationId(), "D1-3查询部门类型字典列表(公共)-1-3-16查询部门类型列表-组织ID不能为空", false);
        Assert.isNull(queryOrgClassListReq.getPurposeCode(), "D1-3查询部门类型字典列表(公共)-1-3-16查询部门类型列表-类型用途编码不能为空", false);
        Assert.isNull(queryOrgClassListReq.getSubjectLifeCycle(), "D1-3查询部门类型字典列表(公共)-1-3-16查询部门类型列表-主体生命周期不能为空", false);
        Assert.isNull(queryOrgClassListReq.getSpaceId(), "D1-3查询部门类型字典列表(公共)-1-3-16查询部门类型列表-创建于空间ID不能为空", false);
        listTypeDictionary = mTypeDictionaryService.queryOrgClassList(queryOrgClassListReq);
        Assert.isTrue(listTypeDictionary == null || CollectionUtil.isEmpty(listTypeDictionary) || listTypeDictionary == null || CollectionUtil.isEmpty(listTypeDictionary) || listTypeDictionary.size() == 0, "返回值不能为空", false);

        listTypeDictionary_1 = listTypeDictionary;

        QueryDeptClassListComRespDto retData = new QueryDeptClassListComRespDto();
        //todo dong 未找到匹配生成策略,请检查生成策略retData.setDeptClassList(listTypeDictionary_1.getTypeDictionaryId()/listTypeDictionary_1.getTypeDictionaryCode()/listTypeDictionary_1.getTypeDictionaryName()),数据源项; to( ==>tableName:undefined, fieldEnname:DeptClassList ,uniqueId: 218807_1 uniqueSourceId:out_null_null) from (varName:undefined fieldundefined)
        retData.setDeptClassList(listTypeDictionary_1.stream().map(p -> BeanUtil.toBean(p, DeptClassDto.class)).collect(Collectors.toList()));


        return retData;
    }

    /**
     * D1查询工作任务来源列表[9089]
     * gen by moon at 4/3/2024, 12:09:24 AM
     */
    @Trace(operationName = "D1查询工作任务来源列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryWorkTaskSourceListRespDto queryWorkTaskSourceList(QueryWorkTaskSourceListReqDto reqDto) {


        List<TypeDictionary> listTypeDictionary_1 = new ArrayList<>();
//步骤0: M1-获取接收字段（特殊方法） - queryReceiveFieldDetail
        //ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
        QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
        if (reqDto != null) {
            receptionServiceReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1688519_1
            receptionServiceReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1688520_1
            receptionServiceReq.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1689559_1
        }

        /*M1接收入参字段[3715]  用于特殊方法接收上游入参。 */

        receptionServiceRes = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq);


//步骤1: D1分析部门业务身份(公共) - analysisDeptBusinessIdentityCom
        AnalysisDeptBusinessIdentityComRespDto analysisDeptBusinessIdentityComRespDto = null;
        AnalysisDeptBusinessIdentityComReqDto analysisDeptBusinessIdentityComReqDto = new AnalysisDeptBusinessIdentityComReqDto();
        if (reqDto != null) {
            analysisDeptBusinessIdentityComReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1689555_1
            analysisDeptBusinessIdentityComReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1689556_1
        }

        /*D1分析部门业务身份(公共)[9091]   */

        analysisDeptBusinessIdentityComRespDto = analysisDeptBusinessIdentityCom(analysisDeptBusinessIdentityComReqDto)/*vcase invoke 同服务,同domain*/;


//步骤2: 1-3-16执行主题标识模糊查类型字典 - implementThemeCodeVagueQueryOrgClass
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        if (analysisDeptBusinessIdentityComRespDto != null) {
            ImplementThemeCodeVagueQueryOrgClassReq implementThemeCodeVagueQueryOrgClassReq = new ImplementThemeCodeVagueQueryOrgClassReq();
            implementThemeCodeVagueQueryOrgClassReq.setPurposeCode("WROK_TASK_SOURCE_CONF");//sourceId:1688273_1
            implementThemeCodeVagueQueryOrgClassReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1688276_1
            implementThemeCodeVagueQueryOrgClassReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1688277_1
            if (analysisDeptBusinessIdentityComRespDto != null) {
                implementThemeCodeVagueQueryOrgClassReq.setThemeCode(analysisDeptBusinessIdentityComRespDto.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1688274_1
            }
            if (reqDto != null) {
                implementThemeCodeVagueQueryOrgClassReq.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1688275_1
            }

            /*1-3-16执行主题标识模糊查类型字典[9090]   */
            Assert.isNull(implementThemeCodeVagueQueryOrgClassReq.getThemeCode(), "D1查询工作任务来源列表-1-3-16执行主题标识模糊查类型字典-主题标识不能为空", false);
            Assert.isNull(implementThemeCodeVagueQueryOrgClassReq.getPurposeCode(), "D1查询工作任务来源列表-1-3-16执行主题标识模糊查类型字典-类型用途编码不能为空", false);
            Assert.isNull(implementThemeCodeVagueQueryOrgClassReq.getSubjectLifeCycle(), "D1查询工作任务来源列表-1-3-16执行主题标识模糊查类型字典-主体生命周期不能为空", false);
            Assert.isNull(implementThemeCodeVagueQueryOrgClassReq.getSpaceId(), "D1查询工作任务来源列表-1-3-16执行主题标识模糊查类型字典-创建于空间ID不能为空", false);
            listTypeDictionary = mTypeDictionaryService.implementThemeCodeVagueQueryOrgClass(implementThemeCodeVagueQueryOrgClassReq)/*vcase invoke 本地 method 方法调用;*/;


            listTypeDictionary_1 = listTypeDictionary;
        }

        QueryWorkTaskSourceListRespDto retData = new QueryWorkTaskSourceListRespDto();
        retData.setWorkTaskSourceList(listTypeDictionary_1.stream().map(item -> BeanUtil.toBean(item, WorkTaskSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1689562_1


        return retData;
    }

    /**
     * D1分析部门业务身份(公共)[9091]
     * gen by moon at 4/2/2024, 11:31:28 PM
     */
    @Trace(operationName = "D1分析部门业务身份(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AnalysisDeptBusinessIdentityComRespDto analysisDeptBusinessIdentityCom(AnalysisDeptBusinessIdentityComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
        if ((reqDto != null && reqDto.getDeptId() != null && reqDto != null && reqDto.getOrganizationId() == null)) {
            //if((D1分析部门业务身份(公共).部门ID 值不等于空  and D1分析部门业务身份(公共).组织ID 值等于空 ))  65850

            Dept dept = null;
            QueryDeptDetailReq queryDeptDetailReq = new QueryDeptDetailReq();
            queryDeptDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1689293_1_65852
            if (reqDto != null) {
                queryDeptDetailReq.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1689292_1_65852
            }

            /*1-3-09查询部门业务身份标识[218]   */
            Assert.isNull(queryDeptDetailReq.getDeptId(), "D1分析部门业务身份(公共)-1-3-09查询部门业务身份标识-部门ID不能为空", false);
            Assert.isNull(queryDeptDetailReq.getSubjectLifeCycle(), "D1分析部门业务身份(公共)-1-3-09查询部门业务身份标识-主体生命周期不能为空", false);
            dept = mDeptService.queryDeptDetail(queryDeptDetailReq)/*vcase invoke 本地 method 方法调用;*/;


//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            if (dept != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
                if (dept != null) {
                    receptionServiceReq.setDeptBusinessIdentity(dept.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1689297_1_65855
                }

                /*M1接收部门业务身份出参[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq.getDeptBusinessIdentity(), "D1分析部门业务身份(公共)-M1接收部门业务身份出参-部门业务身份不能为空", false);
                receptionServiceRes = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq);


                receptionServiceRes_1 = receptionServiceRes;
            }
        } else if ((reqDto != null && reqDto.getOrganizationId() != null && reqDto != null && reqDto.getDeptId() == null)) {
            //elseif((D1分析部门业务身份(公共).组织ID 值不等于空  and D1分析部门业务身份(公共).部门ID 值等于空 ))  65851

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq_1.setDeptBusinessIdentity("TOP_LEVEL");//sourceId:1689302_1_65858

            /*M1约定高层部门业务身份[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_1.getDeptBusinessIdentity(), "D1分析部门业务身份(公共)-M1约定高层部门业务身份-部门业务身份不能为空", false);
            receptionServiceRes_2 = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq_1);


//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_4 = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq_2 = new QueryReceiveFieldDetailReqDto();
            if (receptionServiceRes_2 != null) {
                receptionServiceReq_2.setDeptBusinessIdentity(receptionServiceRes_2.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1689297_1_65859
            }

            /*M1接收部门业务身份出参[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq_2.getDeptBusinessIdentity(), "D1分析部门业务身份(公共)-M1接收部门业务身份出参-部门业务身份不能为空", false);
            receptionServiceRes_4 = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq_2);


            receptionServiceRes_1 = receptionServiceRes_4;
        }
        AnalysisDeptBusinessIdentityComRespDto retData = new AnalysisDeptBusinessIdentityComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setDeptBusinessIdentity(receptionServiceRes_1.getDeptBusinessIdentity());//SimpleFieldAssign//sourceId:1689554_1
        }


        return retData;
    }

    /**
     * D1获取部门业务身份(公共)[9092]
     * gen by moon at 4/2/2024, 11:31:40 PM
     */
    @Trace(operationName = "D1获取部门业务身份(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ObtainDeptBusinessIdentityComRespDto obtainDeptBusinessIdentityCom(ObtainDeptBusinessIdentityComReqDto reqDto) {


        ImplementDataAppointFormatShiftTextComRespDto implementDataAppointFormatShiftTextComRespDto_1 = null;
        if ((reqDto != null && reqDto.getDeptBusinessIdentityList() != null && reqDto.getDeptBusinessIdentityList().size() > 0)) {
            //if(D1获取部门业务身份(公共).部门业务身份列表数据集条数 大于 0)  65856

            ImplementDataAppointFormatShiftTextComRespDto implementDataAppointFormatShiftTextComRespDto = null;
            ImplementDataAppointFormatShiftTextComReqDto implementDataAppointFormatShiftTextComReqDto = new ImplementDataAppointFormatShiftTextComReqDto();
            if (reqDto != null) {
                implementDataAppointFormatShiftTextComReqDto.setDataAppointFormatShiftTextList(reqDto.getDeptBusinessIdentityList());//list-field-assign//sourceId:1689283_1_65857
                implementDataAppointFormatShiftTextComReqDto.setCustomField1(reqDto.getCustomField());//SimpleFieldAssign//sourceId:1689284_1_65857
            }

            /*D2执行数据集按指定格式转文本(公共)[7515]   */
            Assert.isNull(implementDataAppointFormatShiftTextComReqDto.getCustomField1(), "D1获取部门业务身份(公共)-D2执行数据集按指定格式转文本(公共)-自定义字段1不能为空", false);
            implementDataAppointFormatShiftTextComRespDto = interfaceModeService.implementDataAppointFormatShiftTextCom(implementDataAppointFormatShiftTextComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            implementDataAppointFormatShiftTextComRespDto_1 = implementDataAppointFormatShiftTextComRespDto;
        }
        ObtainDeptBusinessIdentityComRespDto retData = new ObtainDeptBusinessIdentityComRespDto();
        if (implementDataAppointFormatShiftTextComRespDto_1 != null) {
            retData.setCustomText(implementDataAppointFormatShiftTextComRespDto_1.getCustomText());//SimpleFieldAssign//sourceId:1689291_1
        }


        return retData;
    }

    /**
     * D1查询UCD筛选工作任务来源列表[9094]
     * gen by moon at 5/13/2024, 12:08:48 AM
     */
    @Trace(operationName = "D1查询UCD筛选工作任务来源列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryUcdWorkTaskSourceListRespDto queryUcdWorkTaskSourceList(QueryUcdWorkTaskSourceListReqDto reqDto) {


        ImplementReceiveWorkTaskSourceRespDto receptionServiceRes_1 = null;
//virtualUsage D1准备入参：1当前身份人员就职部门的业务身份(公共)  65861
        ObtainAssumeDeptBusinessIdentityComRespDto obtainAssumeDeptBusinessIdentityComRespDto = null;
        ObtainAssumeDeptBusinessIdentityComReqDto obtainAssumeDeptBusinessIdentityComReqDto = new ObtainAssumeDeptBusinessIdentityComReqDto();
        if (reqDto != null) {
            obtainAssumeDeptBusinessIdentityComReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1689890_1_65861
            obtainAssumeDeptBusinessIdentityComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1689891_1_65861
        }

        /*D1准备入参：1当前身份人员就职部门的业务身份(公共)[9095]   */
        Assert.isNull(obtainAssumeDeptBusinessIdentityComReqDto.getOriginalRoleMemberId(), "D1查询UCD筛选工作任务来源列表-D1准备入参：1当前身份人员就职部门的业务身份(公共)-身份人员ID不能为空", false);
        Assert.isNull(obtainAssumeDeptBusinessIdentityComReqDto.getSpaceId(), "D1查询UCD筛选工作任务来源列表-D1准备入参：1当前身份人员就职部门的业务身份(公共)-创建于空间ID不能为空", false);
        obtainAssumeDeptBusinessIdentityComRespDto = orgService.obtainAssumeDeptBusinessIdentityCom(obtainAssumeDeptBusinessIdentityComReqDto)/*vcase invoke isSameApp*/;


        if ((obtainAssumeDeptBusinessIdentityComRespDto != null && obtainAssumeDeptBusinessIdentityComRespDto.getDeptList() != null && obtainAssumeDeptBusinessIdentityComRespDto.getDeptList().size() > 0)) {
            //if(D1获取就职部门的业务身份(公共).部门列表数据集条数 大于 0)  65862

            List<TypeDictionary> listTypeDictionary = new ArrayList<>();
            QueryOrgClassListReq queryOrgClassListReq = new QueryOrgClassListReq();
            queryOrgClassListReq.setPurposeCode("WROK_TASK_SOURCE_CONF");//sourceId:1789985_1_68245
            queryOrgClassListReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1789989_1_68245
            if (reqDto != null) {
                queryOrgClassListReq.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1789995_1_68245
                queryOrgClassListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1789992_1_68245
            }

            /*1-3-16查空间下全量工作任务来源列表[295]   */
            Assert.isNull(queryOrgClassListReq.getPurposeCode(), "D1查询UCD筛选工作任务来源列表-1-3-16查空间下全量工作任务来源列表-类型用途编码不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSubjectLifeCycle(), "D1查询UCD筛选工作任务来源列表-1-3-16查空间下全量工作任务来源列表-主体生命周期不能为空", false);
            Assert.isNull(queryOrgClassListReq.getSpaceId(), "D1查询UCD筛选工作任务来源列表-1-3-16查空间下全量工作任务来源列表-创建于空间ID不能为空", false);
            listTypeDictionary = mTypeDictionaryService.queryOrgClassList(queryOrgClassListReq)/*vcase invoke 本地 method 方法调用;*/;


            ImplementTwoDatasVagueMateAssignDatasResultComRespDto implementTwoDatasVagueMateAssignDatasResultComRespDto = null;
            if (obtainAssumeDeptBusinessIdentityComRespDto != null && listTypeDictionary != null && !CollectionUtil.isEmpty(listTypeDictionary) && listTypeDictionary.size() > 0) {
                ImplementTwoDatasVagueMateAssignDatasResultComReqDto implementTwoDatasVagueMateAssignDatasResultComReqDto = new ImplementTwoDatasVagueMateAssignDatasResultComReqDto();
                if (obtainAssumeDeptBusinessIdentityComRespDto != null) {
                    implementTwoDatasVagueMateAssignDatasResultComReqDto.setDataSetsListOne(obtainAssumeDeptBusinessIdentityComRespDto.getDeptList());//list-field-assign//sourceId:1790007_1_68246
                }
                if (listTypeDictionary != null && !CollectionUtil.isEmpty(listTypeDictionary) && listTypeDictionary != null && !CollectionUtil.isEmpty(listTypeDictionary)) {
                    implementTwoDatasVagueMateAssignDatasResultComReqDto.setDataSetsListTwo(//objList-to-objLists
                            listTypeDictionary.stream().map(item -> {
                                DataSetsListTwoDto elm = new DataSetsListTwoDto();
                                elm.setAssignMateField(item.getThemeCode());//SimpleFieldAssign//sourceId:361206_2_68246
                                elm.setCustomField1(item.getTypeDictionaryId());//SimpleFieldAssign//sourceId:361207_2_68246
                                elm.setCustomField2(item.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:361208_2_68246
                                elm.setCustomField3(item.getTypeDictionaryName());//SimpleFieldAssign//sourceId:361209_2_68246
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1790008_1_68246
                }

                /*D2部门业务身份类型模糊匹配工作任务来源数据集结果(公共)[9545]   */

                implementTwoDatasVagueMateAssignDatasResultComRespDto = interfaceModeService.implementTwoDatasVagueMateAssignDatasResultCom(implementTwoDatasVagueMateAssignDatasResultComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
//ModelCode: receptionService
            ImplementReceiveWorkTaskSourceRespDto receptionServiceRes = null;
            if (implementTwoDatasVagueMateAssignDatasResultComRespDto != null) {
                ImplementReceiveWorkTaskSourceReqDto receptionServiceReq = new ImplementReceiveWorkTaskSourceReqDto();
                if (implementTwoDatasVagueMateAssignDatasResultComRespDto != null && implementTwoDatasVagueMateAssignDatasResultComRespDto.getComDatasList() != null && !CollectionUtil.isEmpty(implementTwoDatasVagueMateAssignDatasResultComRespDto.getComDatasList())) {
                    receptionServiceReq.setOrgClassList(//objList-to-objLists
                            implementTwoDatasVagueMateAssignDatasResultComRespDto.getComDatasList().stream().map(item -> {
                                OrgClassDto elm = new OrgClassDto();
                                if (item != null) {
                                    elm.setTypeDictionaryCode(item.getCustomField2());//SimpleFieldAssign//sourceId:361749_2_65880
                                    elm.setTypeDictionaryName(item.getCustomField3());//SimpleFieldAssign//sourceId:361750_2_65880
                                }
                                return elm;
                            }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1794046_1_65880
                }

                /*M1执行接收工作任务来源[9109]  用于特殊方法接收上游入参。 */

                receptionServiceRes = nbOrgDictionary.implementReceiveWorkTaskSource(receptionServiceReq);


                receptionServiceRes_1 = receptionServiceRes;
            }
        }
        QueryUcdWorkTaskSourceListRespDto retData = new QueryUcdWorkTaskSourceListRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setWorkTaskSourceList(receptionServiceRes_1.getOrgClassList().stream().map(item -> BeanUtil.toBean(item, WorkTaskSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1691630_1
        }


        return retData;
    }

    /**
     * D1查询工作任务来源详情(公共)[9114]
     * gen by moon at 4/2/2024, 11:32:31 PM
     */
    @Trace(operationName = "D1查询工作任务来源详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryWorkTaskSourceDetailComRespDto queryWorkTaskSourceDetailCom(QueryWorkTaskSourceDetailComReqDto reqDto) {


        TypeDictionary typeDictionary_1 = null;
//步骤0: 1-3-16查询工作任务来源详情 - queryWorkTaskSourceDetail
        TypeDictionary typeDictionary = null;
        QueryWorkTaskSourceDetailReq queryWorkTaskSourceDetailReq = new QueryWorkTaskSourceDetailReq();
        queryWorkTaskSourceDetailReq.setPurposeCode("WROK_TASK_SOURCE_CONF");//sourceId:1690153_1
        queryWorkTaskSourceDetailReq.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1690154_1
        queryWorkTaskSourceDetailReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1690155_1
        if (reqDto != null) {
            queryWorkTaskSourceDetailReq.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1690156_1
        }

        /*1-3-16查询工作任务来源详情[9120]   */
        Assert.isNull(queryWorkTaskSourceDetailReq.getTypeDictionaryCode(), "D1查询工作任务来源详情(公共)-1-3-16查询工作任务来源详情-类型字典编码不能为空", false);
        Assert.isNull(queryWorkTaskSourceDetailReq.getPurposeCode(), "D1查询工作任务来源详情(公共)-1-3-16查询工作任务来源详情-类型用途编码不能为空", false);
        Assert.isNull(queryWorkTaskSourceDetailReq.getSubjectLifeCycle(), "D1查询工作任务来源详情(公共)-1-3-16查询工作任务来源详情-主体生命周期不能为空", false);
        Assert.isNull(queryWorkTaskSourceDetailReq.getSpaceId(), "D1查询工作任务来源详情(公共)-1-3-16查询工作任务来源详情-创建于空间ID不能为空", false);
        typeDictionary = mTypeDictionaryService.queryWorkTaskSourceDetail(queryWorkTaskSourceDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        typeDictionary_1 = typeDictionary;

        QueryWorkTaskSourceDetailComRespDto retData = new QueryWorkTaskSourceDetailComRespDto();
        if (typeDictionary_1 != null) {
            retData.setTypeDictionaryId(typeDictionary_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1690161_1
            retData.setTypeDictionaryCode(typeDictionary_1.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1690162_1
            retData.setTypeDictionaryName(typeDictionary_1.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1690163_1
        }


        return retData;
    }

    /**
     * D1新增工作任务来源数据（内存）(公共)[9138]
     * gen by moon at 4/2/2024, 11:33:27 PM
     */
    @Trace(operationName = "D1新增工作任务来源数据（内存）(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddWorkTaskSourceDataStorageComRespDto addWorkTaskSourceDataStorageCom(AddWorkTaskSourceDataStorageComReqDto reqDto) {


        if ((reqDto != null && reqDto.getOrgClassList() != null && reqDto.getOrgClassList().size() > 0)) {
            //if(D1新增工作任务来源数据（内存）(公共).组织架构数据字典列表数据集条数 大于 0)  65871

//ModelCode: circulationCollections
            for (OrgClassDto circulationCollectionsRes : reqDto.getOrgClassList()) {

                AddFrameWorkMemoryBusinessSetDataComRespDto addFrameWorkMemoryBusinessSetDataComRespDto = null;
                AddFrameWorkMemoryBusinessSetDataComReqDto addFrameWorkMemoryBusinessSetDataComReqDto = new AddFrameWorkMemoryBusinessSetDataComReqDto();
                addFrameWorkMemoryBusinessSetDataComReqDto.setIsDataList("TRUE");//sourceId:1690799_1_65873
                addFrameWorkMemoryBusinessSetDataComReqDto.setCustomField1("typeDictionaryCode");//CUSTOM_CONVENTION//sourceId:1690697_1_65873
                addFrameWorkMemoryBusinessSetDataComReqDto.setCustomField2("typeDictionaryName");//CUSTOM_CONVENTION//sourceId:1690699_1_65873
                if (reqDto != null) {
                    addFrameWorkMemoryBusinessSetDataComReqDto.setDataObjectBatchCode(reqDto.getDataObjectBatchCode());//SimpleFieldAssign//sourceId:1690797_1_65873
                    addFrameWorkMemoryBusinessSetDataComReqDto.setBusinessDataObject(reqDto.getBusinessDataObject());//SimpleFieldAssign//sourceId:1690798_1_65873
                }
                if (circulationCollectionsRes != null) {
                    addFrameWorkMemoryBusinessSetDataComReqDto.setCustomFieldValue1(circulationCollectionsRes.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1690698_1_65873
                    addFrameWorkMemoryBusinessSetDataComReqDto.setCustomFieldValue2(circulationCollectionsRes.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1690700_1_65873
                }

                /*D1新增框架内存业务数据(业务原子)[9137]   */
                Assert.isNull(addFrameWorkMemoryBusinessSetDataComReqDto.getDataObjectBatchCode(), "D1新增工作任务来源数据（内存）(公共)-D1新增框架内存业务数据(业务原子)-数据对象批次标识不能为空", false);
                Assert.isNull(addFrameWorkMemoryBusinessSetDataComReqDto.getBusinessDataObject(), "D1新增工作任务来源数据（内存）(公共)-D1新增框架内存业务数据(业务原子)-业务数据对象不能为空", false);
                Assert.isNull(addFrameWorkMemoryBusinessSetDataComReqDto.getIsDataList(), "D1新增工作任务来源数据（内存）(公共)-D1新增框架内存业务数据(业务原子)-是否是数据集对象不能为空", false);
                Assert.isNull(addFrameWorkMemoryBusinessSetDataComReqDto.getCustomField1(), "D1新增工作任务来源数据（内存）(公共)-D1新增框架内存业务数据(业务原子)-自定义字段1不能为空", false);
                Assert.isNull(addFrameWorkMemoryBusinessSetDataComReqDto.getCustomFieldValue1(), "D1新增工作任务来源数据（内存）(公共)-D1新增框架内存业务数据(业务原子)-自定义字段值1不能为空", false);
                Assert.isNull(addFrameWorkMemoryBusinessSetDataComReqDto.getCustomField2(), "D1新增工作任务来源数据（内存）(公共)-D1新增框架内存业务数据(业务原子)-自定义字段2不能为空", false);
                Assert.isNull(addFrameWorkMemoryBusinessSetDataComReqDto.getCustomFieldValue2(), "D1新增工作任务来源数据（内存）(公共)-D1新增框架内存业务数据(业务原子)-自定义字段值2不能为空", false);
                addFrameWorkMemoryBusinessSetDataComRespDto = businessAtomService.addFrameWorkMemoryBusinessSetDataCom(addFrameWorkMemoryBusinessSetDataComReqDto)/*vcase invoke isSameApp*/;


//ModelCode: circulationEnd
            }

        }
        AddWorkTaskSourceDataStorageComRespDto retData = new AddWorkTaskSourceDataStorageComRespDto();


        return retData;
    }

    /**
     * D1查询工作任务来源匹配部门业务身份列表[9547]
     * gen by moon at 5/12/2024, 12:05:26 AM
     */
    @Trace(operationName = "D1查询工作任务来源匹配部门业务身份列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryWorkTaskSourceMateDeptBusinessIdentityListRespDto queryWorkTaskSourceMateDeptBusinessIdentityList(QueryWorkTaskSourceMateDeptBusinessIdentityListReqDto reqDto) {


        ImplementReceiveWorkTaskSourceRespDto receptionServiceRes_2 = null;
//步骤0: M1-获取接收字段（特殊方法） - queryReceiveFieldDetail
        //ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
        QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
        if (reqDto != null) {
            receptionServiceReq.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1790272_1
        }

        /*M1接收入参字段[3715]  用于特殊方法接收上游入参。 */
        Assert.isNull(receptionServiceReq.getThemeCode(), "D1查询工作任务来源匹配部门业务身份列表-M1接收入参字段-主题标识不能为空", false);
        receptionServiceRes = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq);


//步骤1: D2文本字段指定格式转数据集(公共) - implementTextFieldAssignFormatTurnDatasCom
        ImplementTextFieldAssignFormatTurnDatasComRespDto implementTextFieldAssignFormatTurnDatasComRespDto = null;
        ImplementTextFieldAssignFormatTurnDatasComReqDto implementTextFieldAssignFormatTurnDatasComReqDto = new ImplementTextFieldAssignFormatTurnDatasComReqDto();
        implementTextFieldAssignFormatTurnDatasComReqDto.setSeparator(",");//CUSTOM_CONVENTION//sourceId:1790027_1
        if (reqDto != null) {
            implementTextFieldAssignFormatTurnDatasComReqDto.setCustomField(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1790026_1
        }

        /*D2将部门业务身份类型主题标识拼接字段值转数据集（公共）[9549]   */
        Assert.isNull(implementTextFieldAssignFormatTurnDatasComReqDto.getCustomField(), "D1查询工作任务来源匹配部门业务身份列表-D2将部门业务身份类型主题标识拼接字段值转数据集（公共）-自定义字段不能为空", false);
        Assert.isNull(implementTextFieldAssignFormatTurnDatasComReqDto.getSeparator(), "D1查询工作任务来源匹配部门业务身份列表-D2将部门业务身份类型主题标识拼接字段值转数据集（公共）-分隔符不能为空", false);
        implementTextFieldAssignFormatTurnDatasComRespDto = interfaceModeService.implementTextFieldAssignFormatTurnDatasCom(implementTextFieldAssignFormatTurnDatasComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


//步骤2: D2答案值批量查配置结果(公共) - batchQueryEndValueBatchConfResultCom
        BatchQueryEndValueBatchConfResultComRespDto batchQueryEndValueBatchConfResultComRespDto = null;
        if (implementTextFieldAssignFormatTurnDatasComRespDto != null) {
            BatchQueryEndValueBatchConfResultComReqDto batchQueryEndValueBatchConfResultComReqDto = new BatchQueryEndValueBatchConfResultComReqDto();
            batchQueryEndValueBatchConfResultComReqDto.setResultAspObjId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1790294_1
            batchQueryEndValueBatchConfResultComReqDto.setConfItemCode("DEPT_BUSINESS_IDENTITY");//CUSTOM_CONVENTION//sourceId:1790295_1
            batchQueryEndValueBatchConfResultComReqDto.setIsPlatData("FALSE");//sourceId:1790296_1
            if (implementTextFieldAssignFormatTurnDatasComRespDto != null) {
                batchQueryEndValueBatchConfResultComReqDto.setConfEndValueList(implementTextFieldAssignFormatTurnDatasComRespDto.getComDatasList());//list-field-assign//sourceId:1790293_1
            }

            /*D2答案值批量查配置结果(公共)[9551]   */
            Assert.isNull(batchQueryEndValueBatchConfResultComReqDto.getResultAspObjId(), "D1查询工作任务来源匹配部门业务身份列表-D2答案值批量查配置结果(公共)-开通对象ID不能为空", false);
            Assert.isNull(batchQueryEndValueBatchConfResultComReqDto.getConfItemCode(), "D1查询工作任务来源匹配部门业务身份列表-D2答案值批量查配置结果(公共)-配置项标识不能为空", false);
            Assert.isNull(batchQueryEndValueBatchConfResultComReqDto.getIsPlatData(), "D1查询工作任务来源匹配部门业务身份列表-D2答案值批量查配置结果(公共)-是否标准答案不能为空", false);
            batchQueryEndValueBatchConfResultComRespDto = confSchemeService.batchQueryEndValueBatchConfResultCom(batchQueryEndValueBatchConfResultComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        }

//步骤3: M1执行接收工作任务来源 - implementReceiveWorkTaskSource
        //ModelCode: receptionService
        ImplementReceiveWorkTaskSourceRespDto receptionServiceRes_1 = null;
        if (batchQueryEndValueBatchConfResultComRespDto != null) {
            ImplementReceiveWorkTaskSourceReqDto receptionServiceReq_1 = new ImplementReceiveWorkTaskSourceReqDto();
            if (batchQueryEndValueBatchConfResultComRespDto != null && batchQueryEndValueBatchConfResultComRespDto.getConfEndValueList() != null && !CollectionUtil.isEmpty(batchQueryEndValueBatchConfResultComRespDto.getConfEndValueList())) {
                receptionServiceReq_1.setDeptBusinessIdentityList(//objList-to-objLists
                        batchQueryEndValueBatchConfResultComRespDto.getConfEndValueList().stream().map(item -> {
                            DeptBusinessIdentityDto elm = new DeptBusinessIdentityDto();
                            if (item != null) {
                                elm.setDeptBusinessIdentityCode(item.getEndValue());//SimpleFieldAssign//sourceId:361336_2
                                elm.setDeptBusinessIdentityName(item.getConfOptionName());//SimpleFieldAssign//sourceId:361337_2
                            }
                            return elm;
                        }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1790305_1
            }

            /*M1接收部门业务身份出参[9109]  用于特殊方法接收上游入参。 */

            receptionServiceRes_1 = nbOrgDictionary.implementReceiveWorkTaskSource(receptionServiceReq_1);


            receptionServiceRes_2 = receptionServiceRes_1;
        }

        QueryWorkTaskSourceMateDeptBusinessIdentityListRespDto retData = new QueryWorkTaskSourceMateDeptBusinessIdentityListRespDto();
        if (receptionServiceRes_2 != null) {
            retData.setDeptBusinessIdentityList(receptionServiceRes_2.getDeptBusinessIdentityList().stream().map(item -> BeanUtil.toBean(item, DeptBusinessIdentityDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1790306_1
        }


        return retData;
    }

    /**
     * D1新增任务分类(公共)[10024]
     * gen by moon at 8/6/2024, 9:38:01 PM
     */
    @Trace(operationName = "D1新增任务分类(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddTaskCategoriesComRespDto addTaskCategoriesCom(AddTaskCategoriesComReqDto reqDto) {


        String string_1 = null;
//步骤0: 1-3-16新增组织架构类型字典 - addOrgClass
        String string = null;
        TypeDictionary typeDictionary = new TypeDictionary();
        typeDictionary.setPurposeCode("TASK_CATEGORIES");//sourceId:1949161_1
        if (reqDto != null) {
            typeDictionary.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1949167_1
            typeDictionary.setParentTypeDictionaryCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1960817_1
            typeDictionary.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1949162_1
            typeDictionary.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1949163_1
            typeDictionary.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1949168_1
            typeDictionary.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1949169_1
            typeDictionary.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1949171_1
            typeDictionary.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:1949164_1
            typeDictionary.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1949165_1
        }

        /*1-3-16新增组织架构类型字典[291]   */
        Assert.isNull(typeDictionary.getPurposeCode(), "D1新增任务分类(公共)-1-3-16新增组织架构类型字典-类型用途编码不能为空", false);
        Assert.isNull(typeDictionary.getTypeDictionaryCode(), "D1新增任务分类(公共)-1-3-16新增组织架构类型字典-类型字典编码不能为空", false);
        Assert.isNull(typeDictionary.getTypeDictionaryName(), "D1新增任务分类(公共)-1-3-16新增组织架构类型字典-类型字典名称不能为空", false);
        Assert.isNull(typeDictionary.getOrderNumber(), "D1新增任务分类(公共)-1-3-16新增组织架构类型字典-排序不能为空", false);
        Assert.isNull(typeDictionary.getSubjectLifeCycle(), "D1新增任务分类(公共)-1-3-16新增组织架构类型字典-主体生命周期不能为空", false);
        string = mTypeDictionaryService.addOrgClass(typeDictionary)/*vcase invoke 本地 method 方法调用;*/;


        string_1 = string;

        AddTaskCategoriesComRespDto retData = new AddTaskCategoriesComRespDto();
        if (string_1 != null) {
            retData.setTypeDictionaryId(string_1);//SimpleFieldAssign//sourceId:1949180_1
        }


        return retData;
    }

    /**
     * D1新增任务分类业务处理[10025]
     * gen by moon at 8/6/2024, 9:38:02 PM
     */
    @Trace(operationName = "D1新增任务分类业务处理")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddTaskCategoriesBusinessHandleRespDto addTaskCategoriesBusinessHandle(AddTaskCategoriesBusinessHandleReqDto reqDto) {


        AddTaskCategoriesComRespDto addTaskCategoriesComRespDto_1 = null;
//virtualUsage 1-3-16查询任务分类列表  71923
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        QueryTaskCategoriesListReq queryTaskCategoriesListReq = new QueryTaskCategoriesListReq();
        queryTaskCategoriesListReq.setIsSystemData("FALSE");//sourceId:1952414_1_71923
        queryTaskCategoriesListReq.setIsArchive("FALSE");//sourceId:1952415_1_71923
        queryTaskCategoriesListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1952416_1_71923
        if (reqDto != null) {
            queryTaskCategoriesListReq.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1952412_1_71923
            queryTaskCategoriesListReq.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1952413_1_71923
        }

        /*1-3-16查询任务分类列表[10041]   */
        Assert.isNull(queryTaskCategoriesListReq.getTypeDictionaryName(), "D1新增任务分类业务处理-1-3-16查询任务分类列表-类型字典名称不能为空", false);
        Assert.isNull(queryTaskCategoriesListReq.getThemeCode(), "D1新增任务分类业务处理-1-3-16查询任务分类列表-主题标识不能为空", false);
        Assert.isNull(queryTaskCategoriesListReq.getIsSystemData(), "D1新增任务分类业务处理-1-3-16查询任务分类列表-是否系统数据不能为空", false);
        Assert.isNull(queryTaskCategoriesListReq.getIsArchive(), "D1新增任务分类业务处理-1-3-16查询任务分类列表-是否存档不能为空", false);
        Assert.isNull(queryTaskCategoriesListReq.getSpaceId(), "D1新增任务分类业务处理-1-3-16查询任务分类列表-创建于空间ID不能为空", false);
        listTypeDictionary = mTypeDictionaryService.queryTaskCategoriesList(queryTaskCategoriesListReq)/*vcase invoke 本地 method 方法调用;*/;


        if ((listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() > 0)) {
            //if(1-3-16查询任务分类列表.任务分类列表数据集条数 大于 0)  71924

//异常结束 71925
            throw new BizException("C00116", "对不起！已存在~！", false);
        } else if ((listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() == 0)) {
            //elseif(1-3-16查询任务分类列表.任务分类列表数据集条数 等于 0)  71926

            QueryTaskCategoriesListComRespDto queryTaskCategoriesListComRespDto = null;
            QueryTaskCategoriesListComReqDto queryTaskCategoriesListComReqDto = new QueryTaskCategoriesListComReqDto();
            queryTaskCategoriesListComReqDto.setIsSystemData("FALSE");//sourceId:1952433_1_71928
            queryTaskCategoriesListComReqDto.setIsArchive("FALSE");//sourceId:1952436_1_71928
            queryTaskCategoriesListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1952438_1_71928
            if (reqDto != null) {
                queryTaskCategoriesListComReqDto.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1952434_1_71928
                queryTaskCategoriesListComReqDto.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1952435_1_71928
            }

            /*D1查询同级任务分类列表(用于计算排序与树排序标识)[10030]   */
            Assert.isNull(queryTaskCategoriesListComReqDto.getThemeCode(), "D1新增任务分类业务处理-D1查询同级任务分类列表(用于计算排序与树排序标识)-主题标识不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto.getLevelNumber(), "D1新增任务分类业务处理-D1查询同级任务分类列表(用于计算排序与树排序标识)-层级不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto.getIsSystemData(), "D1新增任务分类业务处理-D1查询同级任务分类列表(用于计算排序与树排序标识)-是否系统数据不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto.getIsArchive(), "D1新增任务分类业务处理-D1查询同级任务分类列表(用于计算排序与树排序标识)-是否存档不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto.getSpaceId(), "D1新增任务分类业务处理-D1查询同级任务分类列表(用于计算排序与树排序标识)-创建于空间ID不能为空", false);
            queryTaskCategoriesListComRespDto = queryTaskCategoriesListCom(queryTaskCategoriesListComReqDto)/*vcase invoke 同服务,同domain*/;


            CalculateSortNumComRespDto calculateSortNumComRespDto = null;
            if (queryTaskCategoriesListComRespDto != null) {
                CalculateSortNumComReqDto calculateSortNumComReqDto = new CalculateSortNumComReqDto();
                if (queryTaskCategoriesListComRespDto != null && queryTaskCategoriesListComRespDto.getTaskCategoriesList() != null && !CollectionUtil.isEmpty(queryTaskCategoriesListComRespDto.getTaskCategoriesList())) {
                    calculateSortNumComReqDto.setContentAmountList(queryTaskCategoriesListComRespDto.getTaskCategoriesList().stream().map(item -> item.getTypeDictionaryId())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1949443_1_71927
                }

                /*D2计算排序(公共)[10026]   */

                calculateSortNumComRespDto = fwCompCommonClient.calculateSortNumCom(calculateSortNumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            AnalysisTaskCategoriesTreeCodeComRespDto analysisTaskCategoriesTreeCodeComRespDto = null;
            AnalysisTaskCategoriesTreeCodeComReqDto analysisTaskCategoriesTreeCodeComReqDto = new AnalysisTaskCategoriesTreeCodeComReqDto();
            if (reqDto != null) {
                analysisTaskCategoriesTreeCodeComReqDto.setParentTypeDictionaryCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950898_1_71929
                analysisTaskCategoriesTreeCodeComReqDto.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1950899_1_71929
                analysisTaskCategoriesTreeCodeComReqDto.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1950897_1_71929
            }

            /*D1分析任务分类树code值(公共)[10027]   */
            Assert.isNull(analysisTaskCategoriesTreeCodeComReqDto.getThemeCode(), "D1新增任务分类业务处理-D1分析任务分类树code值(公共)-主题标识不能为空", false);
            Assert.isNull(analysisTaskCategoriesTreeCodeComReqDto.getLevelNumber(), "D1新增任务分类业务处理-D1分析任务分类树code值(公共)-层级不能为空", false);
            analysisTaskCategoriesTreeCodeComRespDto = analysisTaskCategoriesTreeCodeCom(analysisTaskCategoriesTreeCodeComReqDto)/*vcase invoke 同服务,同domain*/;


            AddTaskCategoriesComRespDto addTaskCategoriesComRespDto = null;
            if (analysisTaskCategoriesTreeCodeComRespDto != null && calculateSortNumComRespDto != null) {
                AddTaskCategoriesComReqDto addTaskCategoriesComReqDto = new AddTaskCategoriesComReqDto();
                addTaskCategoriesComReqDto.setIsSystemData("FALSE");//sourceId:1949185_1_71930
                if (reqDto != null) {
                    addTaskCategoriesComReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1949181_1_71930
                    addTaskCategoriesComReqDto.setParentTypeDictionaryCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1960819_1_71930
                    addTaskCategoriesComReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1949183_1_71930
                    addTaskCategoriesComReqDto.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1949184_1_71930
                    addTaskCategoriesComReqDto.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1949186_1_71930
                    addTaskCategoriesComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1949188_1_71930
                }
                if (analysisTaskCategoriesTreeCodeComRespDto != null) {
                    addTaskCategoriesComReqDto.setTypeDictionaryCode(analysisTaskCategoriesTreeCodeComRespDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1949182_1_71930
                }
                if (calculateSortNumComRespDto != null) {
                    addTaskCategoriesComReqDto.setOrderNumber(calculateSortNumComRespDto.getOrderNumber());//SimpleFieldAssign//sourceId:1949187_1_71930
                }

                /*D1新增任务分类(公共)[10024]   */
                Assert.isNull(addTaskCategoriesComReqDto.getOrganizationId(), "D1新增任务分类业务处理-D1新增任务分类(公共)-组织ID不能为空", false);
                Assert.isNull(addTaskCategoriesComReqDto.getTypeDictionaryCode(), "D1新增任务分类业务处理-D1新增任务分类(公共)-类型字典编码不能为空", false);
                Assert.isNull(addTaskCategoriesComReqDto.getTypeDictionaryName(), "D1新增任务分类业务处理-D1新增任务分类(公共)-类型字典名称不能为空", false);
                Assert.isNull(addTaskCategoriesComReqDto.getThemeCode(), "D1新增任务分类业务处理-D1新增任务分类(公共)-主题标识不能为空", false);
                Assert.isNull(addTaskCategoriesComReqDto.getLevelNumber(), "D1新增任务分类业务处理-D1新增任务分类(公共)-层级不能为空", false);
                Assert.isNull(addTaskCategoriesComReqDto.getOrderNumber(), "D1新增任务分类业务处理-D1新增任务分类(公共)-排序不能为空", false);
                Assert.isNull(addTaskCategoriesComReqDto.getSubjectLifeCycle(), "D1新增任务分类业务处理-D1新增任务分类(公共)-主体生命周期不能为空", false);
                Assert.isNull(addTaskCategoriesComReqDto.getIsSystemData(), "D1新增任务分类业务处理-D1新增任务分类(公共)-是否系统数据不能为空", false);
                addTaskCategoriesComRespDto = addTaskCategoriesCom(addTaskCategoriesComReqDto)/*vcase invoke 同服务,同domain*/;


                addTaskCategoriesComRespDto_1 = addTaskCategoriesComRespDto;
            }
        }
        AddTaskCategoriesBusinessHandleRespDto retData = new AddTaskCategoriesBusinessHandleRespDto();
        if (addTaskCategoriesComRespDto_1 != null) {
            retData.setTypeDictionaryId(addTaskCategoriesComRespDto_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1952454_1
        }


        return retData;
    }

    /**
     * D1分析任务分类树code值(公共)[10027]
     * gen by moon at 8/6/2024, 9:38:04 PM
     */
    @Trace(operationName = "D1分析任务分类树code值(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AnalysisTaskCategoriesTreeCodeComRespDto analysisTaskCategoriesTreeCodeCom(AnalysisTaskCategoriesTreeCodeComReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_3 = null;
        if ((reqDto != null && reqDto.getLevelNumber() == 1L && reqDto != null && reqDto.getParentTypeDictionaryCode() == null)) {
            //if((D1分析任务分类树code值(公共).层级 等于 1 and D1分析任务分类树code值(公共).上级类型字典编码 值等于空 ))  71877

//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes = null;
            QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
            receptionServiceReq.setTypeDictionaryCode("1001");//CUSTOM_CONVENTION//sourceId:1949956_1_71879
            receptionServiceReq.setLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:1950616_1_71879

            /*M1约定初始上级CODE(1001)[3715]  用于特殊方法接收上游入参。 */
            Assert.isNull(receptionServiceReq.getTypeDictionaryCode(), "D1分析任务分类树code值(公共)-M1约定初始上级CODE(1001)-类型字典编码不能为空", false);
            Assert.isNull(receptionServiceReq.getLevelNumber(), "D1分析任务分类树code值(公共)-M1约定初始上级CODE(1001)-层级不能为空", false);
            receptionServiceRes = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq);


            QueryTaskCategoriesListComRespDto queryTaskCategoriesListComRespDto = null;
            QueryTaskCategoriesListComReqDto queryTaskCategoriesListComReqDto = new QueryTaskCategoriesListComReqDto();
            queryTaskCategoriesListComReqDto.setIsSystemData("FALSE");//sourceId:1949990_1_71880
            queryTaskCategoriesListComReqDto.setIsArchive("FALSE");//sourceId:1949993_1_71880
            queryTaskCategoriesListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1949995_1_71880
            if (reqDto != null) {
                queryTaskCategoriesListComReqDto.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1949991_1_71880
            }
            if (receptionServiceRes != null) {
                queryTaskCategoriesListComReqDto.setLevelNumber(receptionServiceRes.getLevelNumber());//SimpleFieldAssign//sourceId:1950615_1_71880
            }

            /*D1查询同级任务分类code列表(公共)[10030]   */
            Assert.isNull(queryTaskCategoriesListComReqDto.getThemeCode(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-主题标识不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto.getIsSystemData(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-是否系统数据不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto.getIsArchive(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-是否存档不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto.getSpaceId(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-创建于空间ID不能为空", false);
            queryTaskCategoriesListComRespDto = queryTaskCategoriesListCom(queryTaskCategoriesListComReqDto)/*vcase invoke 同服务,同domain*/;


            AnalysisLevelCodeComRespDto analysisLevelCodeComRespDto = null;
            if (queryTaskCategoriesListComRespDto != null) {
                AnalysisLevelCodeComReqDto analysisLevelCodeComReqDto = new AnalysisLevelCodeComReqDto();
                if (receptionServiceRes != null) {
                    analysisLevelCodeComReqDto.setSuperiorContentCode(receptionServiceRes.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1949455_1_71882
                }
                if (queryTaskCategoriesListComRespDto != null && queryTaskCategoriesListComRespDto.getTaskCategoriesList() != null && !CollectionUtil.isEmpty(queryTaskCategoriesListComRespDto.getTaskCategoriesList())) {
                    analysisLevelCodeComReqDto.setSiblingCodeList(queryTaskCategoriesListComRespDto.getTaskCategoriesList().stream().map(item -> item.getTypeDictionaryCode())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1949454_1_71882
                }

                /*D2分析树层级标识(公共)[10028]   */
                Assert.isNull(analysisLevelCodeComReqDto.getSuperiorContentCode(), "D1分析任务分类树code值(公共)-D2分析树层级标识(公共)-上级内容标识不能为空", false);
                analysisLevelCodeComRespDto = fwCompCommonClient.analysisLevelCodeCom(analysisLevelCodeComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_2 = null;
            if (analysisLevelCodeComRespDto != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq_1 = new QueryReceiveFieldDetailReqDto();
                if (analysisLevelCodeComRespDto != null) {
                    receptionServiceReq_1.setTypeDictionaryCode(analysisLevelCodeComRespDto.getCurrentContentCode());//SimpleFieldAssign//sourceId:1950872_1_71895
                }

                /*M1接收任务分类树code出参[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_1.getTypeDictionaryCode(), "D1分析任务分类树code值(公共)-M1接收任务分类树code出参-类型字典编码不能为空", false);
                receptionServiceRes_2 = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq_1);


                receptionServiceRes_3 = receptionServiceRes_2;
            }
        } else if ((reqDto != null && reqDto.getLevelNumber() > 1L && reqDto != null && reqDto.getParentTypeDictionaryCode() != null)) {
            //elseif((D1分析任务分类树code值(公共).层级 大于 1 and D1分析任务分类树code值(公共).上级类型字典编码 值不等于空 ))  71878

            QueryTaskCategoriesListComRespDto queryTaskCategoriesListComRespDto_2 = null;
            QueryTaskCategoriesListComReqDto queryTaskCategoriesListComReqDto_1 = new QueryTaskCategoriesListComReqDto();
            queryTaskCategoriesListComReqDto_1.setIsSystemData("FALSE");//sourceId:1949990_1_71893
            queryTaskCategoriesListComReqDto_1.setIsArchive("FALSE");//sourceId:1949993_1_71893
            queryTaskCategoriesListComReqDto_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1949995_1_71893
            if (reqDto != null) {
                queryTaskCategoriesListComReqDto_1.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1949991_1_71893
                queryTaskCategoriesListComReqDto_1.setParentTypeDictionaryCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950614_1_71893
            }

            /*D1查询同级任务分类code列表(公共)[10030]   */
            Assert.isNull(queryTaskCategoriesListComReqDto_1.getThemeCode(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-主题标识不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto_1.getIsSystemData(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-是否系统数据不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto_1.getIsArchive(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-是否存档不能为空", false);
            Assert.isNull(queryTaskCategoriesListComReqDto_1.getSpaceId(), "D1分析任务分类树code值(公共)-D1查询同级任务分类code列表(公共)-创建于空间ID不能为空", false);
            queryTaskCategoriesListComRespDto_2 = queryTaskCategoriesListCom(queryTaskCategoriesListComReqDto_1)/*vcase invoke 同服务,同domain*/;


            AnalysisLevelCodeComRespDto analysisLevelCodeComRespDto_2 = null;
            if (queryTaskCategoriesListComRespDto_2 != null) {
                AnalysisLevelCodeComReqDto analysisLevelCodeComReqDto_1 = new AnalysisLevelCodeComReqDto();
                if (reqDto != null) {
                    analysisLevelCodeComReqDto_1.setSuperiorContentCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1949455_1_71894
                }
                if (queryTaskCategoriesListComRespDto_2 != null && queryTaskCategoriesListComRespDto_2.getTaskCategoriesList() != null && !CollectionUtil.isEmpty(queryTaskCategoriesListComRespDto_2.getTaskCategoriesList())) {
                    analysisLevelCodeComReqDto_1.setSiblingCodeList(queryTaskCategoriesListComRespDto_2.getTaskCategoriesList().stream().map(item -> item.getTypeDictionaryCode())
                            .collect(Collectors.toList()));/*list-to-strings*///sourceId:1949454_1_71894
                }

                /*D2分析树层级标识(公共)[10028]   */
                Assert.isNull(analysisLevelCodeComReqDto_1.getSuperiorContentCode(), "D1分析任务分类树code值(公共)-D2分析树层级标识(公共)-上级内容标识不能为空", false);
                analysisLevelCodeComRespDto_2 = fwCompCommonClient.analysisLevelCodeCom(analysisLevelCodeComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


            }
//ModelCode: receptionService
            QueryReceiveFieldDetailRespDto receptionServiceRes_4 = null;
            if (analysisLevelCodeComRespDto_2 != null) {
                QueryReceiveFieldDetailReqDto receptionServiceReq_2 = new QueryReceiveFieldDetailReqDto();
                if (analysisLevelCodeComRespDto_2 != null) {
                    receptionServiceReq_2.setTypeDictionaryCode(analysisLevelCodeComRespDto_2.getCurrentContentCode());//SimpleFieldAssign//sourceId:1950872_1_71896
                }

                /*M1接收任务分类树code出参[3715]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_2.getTypeDictionaryCode(), "D1分析任务分类树code值(公共)-M1接收任务分类树code出参-类型字典编码不能为空", false);
                receptionServiceRes_4 = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq_2);


                receptionServiceRes_3 = receptionServiceRes_4;
            }
        } else {
            //else  72029

//异常结束 72030
            throw new BizException("10400501", "对不起！层级或上级类型字典编码错误~", false);
        }
        AnalysisTaskCategoriesTreeCodeComRespDto retData = new AnalysisTaskCategoriesTreeCodeComRespDto();
        if (receptionServiceRes_3 != null) {
            retData.setTypeDictionaryCode(receptionServiceRes_3.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950873_1
        }


        return retData;
    }

    /**
     * D1查询任务分类列表(公共)[10030]
     * gen by moon at 7/24/2024, 2:47:04 AM
     */
    @Trace(operationName = "D1查询任务分类列表(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryTaskCategoriesListComRespDto queryTaskCategoriesListCom(QueryTaskCategoriesListComReqDto reqDto) {


        List<TypeDictionary> listTypeDictionary_1 = new ArrayList<>();
//步骤0: 1-3-16查询组织架构类型字典列表 - queryOrgClassList
        List<TypeDictionary> listTypeDictionary = new ArrayList<>();
        QueryOrgClassListReq queryOrgClassListReq = new QueryOrgClassListReq();
        queryOrgClassListReq.setPurposeCode("TASK_CATEGORIES");//sourceId:1949959_1
        if (reqDto != null) {
            queryOrgClassListReq.setParentTypeDictionaryCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950612_1
            queryOrgClassListReq.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1949970_1
            queryOrgClassListReq.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1949969_1
            queryOrgClassListReq.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:1949960_1
            queryOrgClassListReq.setIsSystemData(reqDto.getIsSystemData());//SimpleFieldAssign//sourceId:1949968_1
            queryOrgClassListReq.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1949973_1
            queryOrgClassListReq.setLevelNumber(reqDto.getLevelNumber());//SimpleFieldAssign//sourceId:1949974_1
            queryOrgClassListReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:1949964_1
            queryOrgClassListReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1949963_1
            queryOrgClassListReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1949966_1
            queryOrgClassListReq.setAppId(reqDto.getAppId());//SimpleFieldAssign//sourceId:1949975_1
        }

        /*1-3-16查询组织架构类型字典列表[295]   */
        Assert.isNull(queryOrgClassListReq.getPurposeCode(), "D1查询任务分类列表(公共)-1-3-16查询组织架构类型字典列表-类型用途编码不能为空", false);
        Assert.isNull(queryOrgClassListReq.getSpaceId(), "D1查询任务分类列表(公共)-1-3-16查询组织架构类型字典列表-创建于空间ID不能为空", false);
        listTypeDictionary = mTypeDictionaryService.queryOrgClassList(queryOrgClassListReq)/*vcase invoke 本地 method 方法调用;*/;


        listTypeDictionary_1 = listTypeDictionary;

        QueryTaskCategoriesListComRespDto retData = new QueryTaskCategoriesListComRespDto();
        retData.setTaskCategoriesList(listTypeDictionary_1.stream().map(item -> BeanUtil.toBean(item, TaskCategoriesDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1949986_1


        return retData;
    }

    /**
     * D1查询任务分类详情(公共)[10031]
     * gen by moon at 7/24/2024, 2:47:16 AM
     */
    @Trace(operationName = "D1查询任务分类详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryTaskCategoriesDetailComRespDto queryTaskCategoriesDetailCom(QueryTaskCategoriesDetailComReqDto reqDto) {


        TypeDictionary typeDictionary_1 = null;
//步骤0: 1-3-16查询组织架构类型字典详情 - queryOrgClassDetail
        TypeDictionary typeDictionary = null;
        QueryOrgClassDetailReq queryOrgClassDetailReq = new QueryOrgClassDetailReq();
        queryOrgClassDetailReq.setPurposeCode("TASK_CATEGORIES");//sourceId:1950530_1
        if (reqDto != null) {
            queryOrgClassDetailReq.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1950551_1
            queryOrgClassDetailReq.setParentTypeDictionaryCode(reqDto.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950552_1
            queryOrgClassDetailReq.setTypeDictionaryCode(reqDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950512_1
            queryOrgClassDetailReq.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1951581_1
            queryOrgClassDetailReq.setThemeCode(reqDto.getThemeCode());//SimpleFieldAssign//sourceId:1950553_1
            queryOrgClassDetailReq.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1950554_1
            queryOrgClassDetailReq.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:1950536_1
            queryOrgClassDetailReq.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1950533_1
        }

        /*1-3-16查询组织架构类型字典详情[950]   */
        Assert.isNull(queryOrgClassDetailReq.getPurposeCode(), "D1查询任务分类详情(公共)-1-3-16查询组织架构类型字典详情-类型用途编码不能为空", false);
        Assert.isNull(queryOrgClassDetailReq.getSpaceId(), "D1查询任务分类详情(公共)-1-3-16查询组织架构类型字典详情-创建于空间ID不能为空", false);
        typeDictionary = mTypeDictionaryService.queryOrgClassDetail(queryOrgClassDetailReq)/*vcase invoke 本地 method 方法调用;*/;


        typeDictionary_1 = typeDictionary;

        QueryTaskCategoriesDetailComRespDto retData = new QueryTaskCategoriesDetailComRespDto();
        if (typeDictionary_1 != null) {
            retData.setTypeDictionaryId(typeDictionary_1.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1950559_1
            retData.setParentTypeDictionaryCode(typeDictionary_1.getParentTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950560_1
            retData.setTypeDictionaryCode(typeDictionary_1.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1950561_1
            retData.setTypeDictionaryName(typeDictionary_1.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1950562_1
            retData.setPurposeCode(typeDictionary_1.getPurposeCode());//SimpleFieldAssign//sourceId:1950563_1
            retData.setThemeCode(typeDictionary_1.getThemeCode());//SimpleFieldAssign//sourceId:1950564_1
            retData.setLevelNumber(typeDictionary_1.getLevelNumber());//SimpleFieldAssign//sourceId:1950565_1
            retData.setOrderNumber(typeDictionary_1.getOrderNumber());//SimpleFieldAssign//sourceId:1950566_1
            retData.setOrganizationId(typeDictionary_1.getOrganizationId());//SimpleFieldAssign//sourceId:1950567_1
            retData.setSubjectLifeCycle(typeDictionary_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1950568_1
            retData.setOperationInductionId(typeDictionary_1.getOperationInductionId());//SimpleFieldAssign//sourceId:1950569_1
            retData.setOperateTime(typeDictionary_1.getOperateTime());//SimpleFieldAssign//sourceId:1950570_1
        }


        return retData;
    }

    /**
     * D1存档任务分类业务处理[10034]
     * gen by moon at 7/24/2024, 3:27:11 AM
     */
    @Trace(operationName = "D1存档任务分类业务处理")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public ArchiveTaskCategoriesBusinessHandleRespDto archiveTaskCategoriesBusinessHandle(ArchiveTaskCategoriesBusinessHandleReqDto reqDto) {


        //virtualUsage D1查询当前任务分类详请(用于判断生命周期状态)  71898
        QueryTaskCategoriesDetailComRespDto queryTaskCategoriesDetailComRespDto = null;
        QueryTaskCategoriesDetailComReqDto queryTaskCategoriesDetailComReqDto = new QueryTaskCategoriesDetailComReqDto();
        queryTaskCategoriesDetailComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1950939_1_71898
        if (reqDto != null) {
            queryTaskCategoriesDetailComReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1950940_1_71898
        }

        /*D1查询当前任务分类详请(用于判断生命周期状态)[10031]   */
        Assert.isNull(queryTaskCategoriesDetailComReqDto.getTypeDictionaryId(), "D1存档任务分类业务处理-D1查询当前任务分类详请(用于判断生命周期状态)-类型字典ID不能为空", false);
        Assert.isNull(queryTaskCategoriesDetailComReqDto.getSpaceId(), "D1存档任务分类业务处理-D1查询当前任务分类详请(用于判断生命周期状态)-创建于空间ID不能为空", false);
        queryTaskCategoriesDetailComRespDto = queryTaskCategoriesDetailCom(queryTaskCategoriesDetailComReqDto)/*vcase invoke 同服务,同domain*/;


//virtualUsage D1执行生命周期判断(公共)  71899
        ImplementLifeCycleJudgmentComRespDto implementLifeCycleJudgmentComRespDto = null;
        if (queryTaskCategoriesDetailComRespDto != null) {
            ImplementLifeCycleJudgmentComReqDto implementLifeCycleJudgmentComReqDto = new ImplementLifeCycleJudgmentComReqDto();
            if (queryTaskCategoriesDetailComRespDto != null) {
                implementLifeCycleJudgmentComReqDto.setSubjectLifeCycle(queryTaskCategoriesDetailComRespDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1950957_1_71899
            }
            if (reqDto != null) {
                implementLifeCycleJudgmentComReqDto.setLifecyCycleOperationType(reqDto.getLifecyCycleOperationType());//SimpleFieldAssign//sourceId:1950956_1_71899
            }

            /*D1执行生命周期判断(公共)[7830]   */
            Assert.isNull(implementLifeCycleJudgmentComReqDto.getSubjectLifeCycle(), "D1存档任务分类业务处理-D1执行生命周期判断(公共)-主体生命周期不能为空", false);
            Assert.isNull(implementLifeCycleJudgmentComReqDto.getLifecyCycleOperationType(), "D1存档任务分类业务处理-D1执行生命周期判断(公共)-生命周期操作类型不能为空", false);
            implementLifeCycleJudgmentComRespDto = batchService.implementLifeCycleJudgmentCom(implementLifeCycleJudgmentComReqDto)/*vcase invoke isSameApp*/;


        }
//virtualUsage D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)  71900
        QueryTaskCategoriesDetailComRespDto queryTaskCategoriesDetailComRespDto_2 = null;
        if (queryTaskCategoriesDetailComRespDto != null) {
            QueryTaskCategoriesDetailComReqDto queryTaskCategoriesDetailComReqDto_1 = new QueryTaskCategoriesDetailComReqDto();
            queryTaskCategoriesDetailComReqDto_1.setIsArchive("FALSE");//sourceId:1951216_1_71900
            queryTaskCategoriesDetailComReqDto_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1951217_1_71900
            if (queryTaskCategoriesDetailComRespDto != null) {
                queryTaskCategoriesDetailComReqDto_1.setParentTypeDictionaryCode(queryTaskCategoriesDetailComRespDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1951219_1_71900
                queryTaskCategoriesDetailComReqDto_1.setThemeCode(queryTaskCategoriesDetailComRespDto.getThemeCode());//SimpleFieldAssign//sourceId:1951220_1_71900
            }

            /*D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)[10031]   */
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getParentTypeDictionaryCode(), "D1存档任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-上级类型字典编码不能为空", false);
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getThemeCode(), "D1存档任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-主题标识不能为空", false);
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getIsArchive(), "D1存档任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-是否存档不能为空", false);
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getSpaceId(), "D1存档任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-创建于空间ID不能为空", false);
            queryTaskCategoriesDetailComRespDto_2 = queryTaskCategoriesDetailCom(queryTaskCategoriesDetailComReqDto_1)/*vcase invoke 同服务,同domain*/;


        }
        if ((queryTaskCategoriesDetailComRespDto_2 != null && queryTaskCategoriesDetailComRespDto_2.getTypeDictionaryId() == null)) {
            //if(D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类).类型字典ID 值等于空 )  71901

            UpdateTaskCategoriesComRespDto updateTaskCategoriesComRespDto = null;
            UpdateTaskCategoriesComReqDto updateTaskCategoriesComReqDto = new UpdateTaskCategoriesComReqDto();
            updateTaskCategoriesComReqDto.setSubjectLifeCycle("ARCHIVING");//sourceId:1950935_1_71902
            updateTaskCategoriesComReqDto.setIsArchive("TRUE");//sourceId:1950936_1_71902
            if (reqDto != null) {
                updateTaskCategoriesComReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1950933_1_71902
            }

            /*D1存档任务分类(公共)[10035]   */
            Assert.isNull(updateTaskCategoriesComReqDto.getTypeDictionaryId(), "D1存档任务分类业务处理-D1存档任务分类(公共)-类型字典ID不能为空", false);
            Assert.isNull(updateTaskCategoriesComReqDto.getSubjectLifeCycle(), "D1存档任务分类业务处理-D1存档任务分类(公共)-主体生命周期不能为空", false);
            Assert.isNull(updateTaskCategoriesComReqDto.getIsArchive(), "D1存档任务分类业务处理-D1存档任务分类(公共)-是否存档不能为空", false);
            updateTaskCategoriesComRespDto = updateTaskCategoriesCom(updateTaskCategoriesComReqDto)/*vcase invoke 同服务,同domain*/;


        } else if ((queryTaskCategoriesDetailComRespDto_2 != null && queryTaskCategoriesDetailComRespDto_2.getTypeDictionaryId() != null)) {
            //elseif(D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类).类型字典ID 值不等于空 )  71903

//异常结束 71906
            throw new BizException("10400500", "对不起！还有下级有效的任务分类，请检查后重试~", false);
        }
        ArchiveTaskCategoriesBusinessHandleRespDto retData = new ArchiveTaskCategoriesBusinessHandleRespDto();


        return retData;
    }

    /**
     * D1修改任务分类(公共)[10035]
     * gen by moon at 7/24/2024, 2:47:41 AM
     */
    @Trace(operationName = "D1修改任务分类(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateTaskCategoriesComRespDto updateTaskCategoriesCom(UpdateTaskCategoriesComReqDto reqDto) {


        //步骤0: 1-3-16修改组织架构类型字典 - updateOrgClass
        boolean bOOLEAN;
        TypeDictionary typeDictionary = new TypeDictionary();
        if (reqDto != null) {
            typeDictionary.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1950919_1
            typeDictionary.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1950929_1
            typeDictionary.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1950923_1
            typeDictionary.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:1950927_1
        }

        /*1-3-16修改组织架构类型字典[292]   */
        Assert.isNull(typeDictionary.getTypeDictionaryId(), "D1修改任务分类(公共)-1-3-16修改组织架构类型字典-类型字典ID不能为空", false);
        bOOLEAN = mTypeDictionaryService.updateOrgClass(typeDictionary)/*vcase invoke 本地 method 方法调用;*/;


        UpdateTaskCategoriesComRespDto retData = new UpdateTaskCategoriesComRespDto();


        return retData;
    }

    /**
     * D1删除任务分类业务处理[10037]
     * gen by moon at 7/24/2024, 3:27:12 AM
     */
    @Trace(operationName = "D1删除任务分类业务处理")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteTaskCategoriesBusinessHandleRespDto deleteTaskCategoriesBusinessHandle(DeleteTaskCategoriesBusinessHandleReqDto reqDto) {


        //virtualUsage D1查询当前任务分类详请(用于判断生命周期状态)  71907
        QueryTaskCategoriesDetailComRespDto queryTaskCategoriesDetailComRespDto = null;
        QueryTaskCategoriesDetailComReqDto queryTaskCategoriesDetailComReqDto = new QueryTaskCategoriesDetailComReqDto();
        queryTaskCategoriesDetailComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1951241_1_71907
        if (reqDto != null) {
            queryTaskCategoriesDetailComReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951242_1_71907
        }

        /*D1查询当前任务分类详请(用于判断生命周期状态)[10031]   */
        Assert.isNull(queryTaskCategoriesDetailComReqDto.getTypeDictionaryId(), "D1删除任务分类业务处理-D1查询当前任务分类详请(用于判断生命周期状态)-类型字典ID不能为空", false);
        Assert.isNull(queryTaskCategoriesDetailComReqDto.getSpaceId(), "D1删除任务分类业务处理-D1查询当前任务分类详请(用于判断生命周期状态)-创建于空间ID不能为空", false);
        queryTaskCategoriesDetailComRespDto = queryTaskCategoriesDetailCom(queryTaskCategoriesDetailComReqDto)/*vcase invoke 同服务,同domain*/;


//virtualUsage D1执行生命周期判断(公共)  71908
        ImplementLifeCycleJudgmentComRespDto implementLifeCycleJudgmentComRespDto = null;
        if (queryTaskCategoriesDetailComRespDto != null) {
            ImplementLifeCycleJudgmentComReqDto implementLifeCycleJudgmentComReqDto = new ImplementLifeCycleJudgmentComReqDto();
            if (queryTaskCategoriesDetailComRespDto != null) {
                implementLifeCycleJudgmentComReqDto.setSubjectLifeCycle(queryTaskCategoriesDetailComRespDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1951259_1_71908
            }
            if (reqDto != null) {
                implementLifeCycleJudgmentComReqDto.setLifecyCycleOperationType(reqDto.getLifecyCycleOperationType());//SimpleFieldAssign//sourceId:1951258_1_71908
            }

            /*D1执行生命周期判断(公共)[7830]   */
            Assert.isNull(implementLifeCycleJudgmentComReqDto.getSubjectLifeCycle(), "D1删除任务分类业务处理-D1执行生命周期判断(公共)-主体生命周期不能为空", false);
            Assert.isNull(implementLifeCycleJudgmentComReqDto.getLifecyCycleOperationType(), "D1删除任务分类业务处理-D1执行生命周期判断(公共)-生命周期操作类型不能为空", false);
            implementLifeCycleJudgmentComRespDto = batchService.implementLifeCycleJudgmentCom(implementLifeCycleJudgmentComReqDto)/*vcase invoke isSameApp*/;


        }
//virtualUsage D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)  71909
        QueryTaskCategoriesDetailComRespDto queryTaskCategoriesDetailComRespDto_2 = null;
        if (queryTaskCategoriesDetailComRespDto != null) {
            QueryTaskCategoriesDetailComReqDto queryTaskCategoriesDetailComReqDto_1 = new QueryTaskCategoriesDetailComReqDto();
            queryTaskCategoriesDetailComReqDto_1.setIsArchive("FALSE");//sourceId:1951261_1_71909
            queryTaskCategoriesDetailComReqDto_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1951262_1_71909
            if (queryTaskCategoriesDetailComRespDto != null) {
                queryTaskCategoriesDetailComReqDto_1.setParentTypeDictionaryCode(queryTaskCategoriesDetailComRespDto.getTypeDictionaryCode());//SimpleFieldAssign//sourceId:1951264_1_71909
                queryTaskCategoriesDetailComReqDto_1.setThemeCode(queryTaskCategoriesDetailComRespDto.getThemeCode());//SimpleFieldAssign//sourceId:1951265_1_71909
            }

            /*D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)[10031]   */
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getParentTypeDictionaryCode(), "D1删除任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-上级类型字典编码不能为空", false);
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getThemeCode(), "D1删除任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-主题标识不能为空", false);
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getIsArchive(), "D1删除任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-是否存档不能为空", false);
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getSpaceId(), "D1删除任务分类业务处理-D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类)-创建于空间ID不能为空", false);
            queryTaskCategoriesDetailComRespDto_2 = queryTaskCategoriesDetailCom(queryTaskCategoriesDetailComReqDto_1)/*vcase invoke 同服务,同domain*/;


        }
        if ((queryTaskCategoriesDetailComRespDto_2 != null && queryTaskCategoriesDetailComRespDto_2.getTypeDictionaryId() == null)) {
            //if(D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类).类型字典ID 值等于空 )  71910

            DeleteTaskCategoriesComRespDto deleteTaskCategoriesComRespDto = null;
            DeleteTaskCategoriesComReqDto deleteTaskCategoriesComReqDto = new DeleteTaskCategoriesComReqDto();
            if (reqDto != null) {
                deleteTaskCategoriesComReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951558_1_71913
            }

            /*D1删除任务分类(公共)[10038]   */
            Assert.isNull(deleteTaskCategoriesComReqDto.getTypeDictionaryId(), "D1删除任务分类业务处理-D1删除任务分类(公共)-类型字典ID不能为空", false);
            deleteTaskCategoriesComRespDto = deleteTaskCategoriesCom(deleteTaskCategoriesComReqDto)/*vcase invoke 同服务,同domain*/;


        } else if ((queryTaskCategoriesDetailComRespDto_2 != null && queryTaskCategoriesDetailComRespDto_2.getTypeDictionaryId() != null)) {
            //elseif(D1查询下级随机一条任务分类(用于判断是否存在有效的下级任务分类).类型字典ID 值不等于空 )  71911

//异常结束 71912
            throw new BizException("10400500", "对不起！还有下级有效的任务分类，请检查后重试~", false);
        }
        DeleteTaskCategoriesBusinessHandleRespDto retData = new DeleteTaskCategoriesBusinessHandleRespDto();


        return retData;
    }

    /**
     * D1删除任务分类(公共)[10038]
     * gen by moon at 7/24/2024, 2:48:04 AM
     */
    @Trace(operationName = "D1删除任务分类(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public DeleteTaskCategoriesComRespDto deleteTaskCategoriesCom(DeleteTaskCategoriesComReqDto reqDto) {


        //步骤0: 1-3-16删除组织架构类型字典 - deleteOrgClass
        boolean bOOLEAN;
        String string = new String();
        if (reqDto != null) {
            string = reqDto.getTypeDictionaryId();
            ;//SimpleFieldAssign//sourceId:1951556_1
        }

        /*1-3-16删除组织架构类型字典[293]   */
        Assert.isNull(string, "D1删除任务分类(公共)-1-3-16删除组织架构类型字典-类型字典ID不能为空", false);
        bOOLEAN = mTypeDictionaryService.deleteOrgClass(string)/*vcase invoke 本地 method 方法调用;*/;


        DeleteTaskCategoriesComRespDto retData = new DeleteTaskCategoriesComRespDto();


        return retData;
    }

    /**
     * D1修改任务分类业务处理[10040]
     * gen by moon at 7/24/2024, 2:48:16 AM
     */
    @Trace(operationName = "D1修改任务分类业务处理")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public UpdateTaskCategoriesBusinessHandleRespDto updateTaskCategoriesBusinessHandle(UpdateTaskCategoriesBusinessHandleReqDto reqDto) {


        //virtualUsage D1查询任务分类详情（用于判断是否允许修改）  71914
        QueryTaskCategoriesDetailComRespDto queryTaskCategoriesDetailComRespDto = null;
        QueryTaskCategoriesDetailComReqDto queryTaskCategoriesDetailComReqDto = new QueryTaskCategoriesDetailComReqDto();
        queryTaskCategoriesDetailComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1951564_1_71914
        if (reqDto != null) {
            queryTaskCategoriesDetailComReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951565_1_71914
            queryTaskCategoriesDetailComReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1951583_1_71914
        }

        /*D1查询任务分类详情（用于判断是否允许修改）[10031]   */
        Assert.isNull(queryTaskCategoriesDetailComReqDto.getTypeDictionaryId(), "D1修改任务分类业务处理-D1查询任务分类详情（用于判断是否允许修改）-类型字典ID不能为空", false);
        Assert.isNull(queryTaskCategoriesDetailComReqDto.getSpaceId(), "D1修改任务分类业务处理-D1查询任务分类详情（用于判断是否允许修改）-创建于空间ID不能为空", false);
        queryTaskCategoriesDetailComRespDto = queryTaskCategoriesDetailCom(queryTaskCategoriesDetailComReqDto)/*vcase invoke 同服务,同domain*/;


        if ((queryTaskCategoriesDetailComRespDto != null && queryTaskCategoriesDetailComRespDto.getTypeDictionaryId() == null)) {
            //if(D1查询任务分类详情（用于判断是否允许修改）.类型字典ID 值等于空 )  71915

            QueryTaskCategoriesDetailComRespDto queryTaskCategoriesDetailComRespDto_2 = null;
            QueryTaskCategoriesDetailComReqDto queryTaskCategoriesDetailComReqDto_1 = new QueryTaskCategoriesDetailComReqDto();
            queryTaskCategoriesDetailComReqDto_1.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1951564_1_71917
            if (reqDto != null) {
                queryTaskCategoriesDetailComReqDto_1.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951565_1_71917
            }

            /*D1查询任务分类详情（用于判断是否允许修改）[10031]   */
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getTypeDictionaryId(), "D1修改任务分类业务处理-D1查询任务分类详情（用于判断是否允许修改）-类型字典ID不能为空", false);
            Assert.isNull(queryTaskCategoriesDetailComReqDto_1.getSpaceId(), "D1修改任务分类业务处理-D1查询任务分类详情（用于判断是否允许修改）-创建于空间ID不能为空", false);
            queryTaskCategoriesDetailComRespDto_2 = queryTaskCategoriesDetailCom(queryTaskCategoriesDetailComReqDto_1)/*vcase invoke 同服务,同domain*/;


            List<TypeDictionary> listTypeDictionary = new ArrayList<>();
            if (queryTaskCategoriesDetailComRespDto_2 != null) {
                QueryTaskCategoriesListReq queryTaskCategoriesListReq = new QueryTaskCategoriesListReq();
                queryTaskCategoriesListReq.setIsSystemData("FALSE");//sourceId:1951862_1_71919
                queryTaskCategoriesListReq.setIsArchive("FALSE");//sourceId:1951863_1_71919
                queryTaskCategoriesListReq.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1951864_1_71919
                if (reqDto != null) {
                    queryTaskCategoriesListReq.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1951860_1_71919
                }
                if (queryTaskCategoriesDetailComRespDto_2 != null) {
                    queryTaskCategoriesListReq.setThemeCode(queryTaskCategoriesDetailComRespDto_2.getThemeCode());//SimpleFieldAssign//sourceId:1951861_1_71919
                }

                /*1-3-16查询任务分类列表[10041]   */
                Assert.isNull(queryTaskCategoriesListReq.getTypeDictionaryName(), "D1修改任务分类业务处理-1-3-16查询任务分类列表-类型字典名称不能为空", false);
                Assert.isNull(queryTaskCategoriesListReq.getThemeCode(), "D1修改任务分类业务处理-1-3-16查询任务分类列表-主题标识不能为空", false);
                Assert.isNull(queryTaskCategoriesListReq.getIsSystemData(), "D1修改任务分类业务处理-1-3-16查询任务分类列表-是否系统数据不能为空", false);
                Assert.isNull(queryTaskCategoriesListReq.getIsArchive(), "D1修改任务分类业务处理-1-3-16查询任务分类列表-是否存档不能为空", false);
                Assert.isNull(queryTaskCategoriesListReq.getSpaceId(), "D1修改任务分类业务处理-1-3-16查询任务分类列表-创建于空间ID不能为空", false);
                listTypeDictionary = mTypeDictionaryService.queryTaskCategoriesList(queryTaskCategoriesListReq)/*vcase invoke 本地 method 方法调用;*/;


            }
            if ((listTypeDictionary != null && listTypeDictionary != null && listTypeDictionary.size() > 0)) {
                //if(1-3-16查询任务分类列表.任务分类列表数据集条数 大于 0)  71920

//异常结束 71921
                throw new BizException("C00116", "对不起！已存在~！", false);
            }


        }

        UpdateTaskCategoriesComRespDto updateTaskCategoriesComRespDto = null;
        UpdateTaskCategoriesComReqDto updateTaskCategoriesComReqDto = new UpdateTaskCategoriesComReqDto();
        if (reqDto != null) {
            updateTaskCategoriesComReqDto.setTypeDictionaryId(reqDto.getTypeDictionaryId());//SimpleFieldAssign//sourceId:1951866_1_71922
            updateTaskCategoriesComReqDto.setTypeDictionaryName(reqDto.getTypeDictionaryName());//SimpleFieldAssign//sourceId:1951867_1_71922
            updateTaskCategoriesComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1951868_1_71922
        }

        /*D1修改任务分类(公共)[10035]   */
        Assert.isNull(updateTaskCategoriesComReqDto.getTypeDictionaryId(), "D1修改任务分类业务处理-D1修改任务分类(公共)-类型字典ID不能为空", false);
        updateTaskCategoriesComRespDto = updateTaskCategoriesCom(updateTaskCategoriesComReqDto)/*vcase invoke 同服务,同domain*/;
        UpdateTaskCategoriesBusinessHandleRespDto retData = new UpdateTaskCategoriesBusinessHandleRespDto();


        return retData;
    }

    /**
     * D1查询任务分类主题列表[10043]
     * gen by moon at 7/24/2024, 2:48:28 AM
     */
    @Trace(operationName = "D1查询任务分类主题列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryTaskCategoriesThemeListRespDto queryTaskCategoriesThemeList(QueryTaskCategoriesThemeListReqDto reqDto) {


        QueryReceiveFieldDetailRespDto receptionServiceRes_1 = null;
//步骤0: D1查询任务分类列表(公共) - queryTaskCategoriesListCom
        QueryTaskCategoriesListComRespDto queryTaskCategoriesListComRespDto = null;
        QueryTaskCategoriesListComReqDto queryTaskCategoriesListComReqDto = new QueryTaskCategoriesListComReqDto();
        queryTaskCategoriesListComReqDto.setLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:1951883_1
        queryTaskCategoriesListComReqDto.setIsSystemData("FALSE");//sourceId:1951890_1
        queryTaskCategoriesListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1951885_1
        queryTaskCategoriesListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1951886_1

        /*D1查询任务分类列表(公共)[10030]   */
        Assert.isNull(queryTaskCategoriesListComReqDto.getLevelNumber(), "D1查询任务分类主题列表-D1查询任务分类列表(公共)-层级不能为空", false);
        Assert.isNull(queryTaskCategoriesListComReqDto.getIsSystemData(), "D1查询任务分类主题列表-D1查询任务分类列表(公共)-是否系统数据不能为空", false);
        Assert.isNull(queryTaskCategoriesListComReqDto.getSpaceId(), "D1查询任务分类主题列表-D1查询任务分类列表(公共)-创建于空间ID不能为空", false);
        queryTaskCategoriesListComRespDto = queryTaskCategoriesListCom(queryTaskCategoriesListComReqDto)/*vcase invoke 同服务,同domain*/;


//步骤1: D2执行多字段数据集记录去重(公共) - implementManyFieldsDataSetDuplicateRemovalCom
        ImplementManyFieldsDataSetDuplicateRemovalComRespDto implementManyFieldsDataSetDuplicateRemovalComRespDto = null;
        if (queryTaskCategoriesListComRespDto != null) {
            ImplementManyFieldsDataSetDuplicateRemovalComReqDto implementManyFieldsDataSetDuplicateRemovalComReqDto = new ImplementManyFieldsDataSetDuplicateRemovalComReqDto();
            if (queryTaskCategoriesListComRespDto != null && queryTaskCategoriesListComRespDto.getTaskCategoriesList() != null && !CollectionUtil.isEmpty(queryTaskCategoriesListComRespDto.getTaskCategoriesList())) {
                implementManyFieldsDataSetDuplicateRemovalComReqDto.setDataSetDuplicateRemovalList(//objList-to-objLists
                        queryTaskCategoriesListComRespDto.getTaskCategoriesList().stream().map(item -> {
                            DataSetDuplicateRemovalDto elm = new DataSetDuplicateRemovalDto();
                            if (item != null) {
                                elm.setCommPrimaryKey(item.getThemeCode());//SimpleFieldAssign//sourceId:400050_2
                            }
                            return elm;
                        }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1951891_1
            }

            /*D2执行任务分类主题标识数据集去重(公共)[7323]   */

            implementManyFieldsDataSetDuplicateRemovalComRespDto = interfaceModeService.implementManyFieldsDataSetDuplicateRemovalCom(implementManyFieldsDataSetDuplicateRemovalComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        }

//步骤2: M1-获取接收字段（特殊方法） - queryReceiveFieldDetail
        //ModelCode: receptionService
        QueryReceiveFieldDetailRespDto receptionServiceRes = null;
        if (implementManyFieldsDataSetDuplicateRemovalComRespDto != null) {
            QueryReceiveFieldDetailReqDto receptionServiceReq = new QueryReceiveFieldDetailReqDto();
            if (implementManyFieldsDataSetDuplicateRemovalComRespDto != null && implementManyFieldsDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList() != null && !CollectionUtil.isEmpty(implementManyFieldsDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList())) {
                receptionServiceReq.setTaskCategoriesList(implementManyFieldsDataSetDuplicateRemovalComRespDto.getDataSetDuplicateRemovalList().stream().map(item -> item.getCommPrimaryKey())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:1952150_1
            }

            /*M1接收主题标识出参[3715]  用于特殊方法接收上游入参。 */

            receptionServiceRes = nbOrgDictionary.queryReceiveFieldDetail(receptionServiceReq);


            receptionServiceRes_1 = receptionServiceRes;
        }

        QueryTaskCategoriesThemeListRespDto retData = new QueryTaskCategoriesThemeListRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setTaskCategoriesList(receptionServiceRes_1.getTaskCategoriesList());//list-field-assign//sourceId:1952151_1
        }


        return retData;
    }
    //
}